[AutoIT] Sound abspielen bzw als Hintergrund Musik verwenden

  • Tag GodLikerz
    heute zeige ich euch wie ihr Musik abspielen könnt(Im Hintergrund)

    Dafür benutzen wir den Befehl SoundPlay

    Code
    [FONT=Arial][B][COLOR=RoyalBlue]SoundPlay[/COLOR][/B][/FONT][FONT=Arial][B][COLOR=Red]([/COLOR][/B][/FONT][FONT=Arial][B][COLOR=Silver]"Datei Name/Pfad"[COLOR=Red],[/COLOR][/COLOR] [COLOR=DarkOrchid]WarteZeit(in sec)[/COLOR][/B][/FONT][FONT=Arial][B][COLOR=DarkOrchid][COLOR=Red])[/COLOR][/COLOR][/B][/FONT]


    Hier zum Bleistift:

    Code
    [FONT=monospace][FONT=Arial][B][COLOR=RoyalBlue]
    [COLOR=DarkOrange]$Sound1[/COLOR] [COLOR=Red]=[/COLOR] SoundPlay[/COLOR][COLOR=Red]([/COLOR][COLOR=Plum]@ScriptDir[/COLOR] [COLOR=Red]&[/COLOR] [COLOR=Silver]"\Donald-Duck.wav"[COLOR=Red],[/COLOR][/COLOR] [COLOR=DarkOrchid]0[COLOR=Red])[/COLOR][/COLOR][/B][/FONT]
    [/FONT]


    Das kann man auch vor eine GUI setzen bzw. am ANfang eines Scripts so läufts durch bis zum Ende
    Wenn man es vorzeitig beenden will muss man den Processnamen des Lieds /SOunds beenden mit ProcessClose("Process Name"
    )
    oder mir -SOundClose($SOund1)

    So Viel Spass Damit

    MFG
    xDrago


    [CENTER]


    [/CENTER]

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!