[AutoIT] Sound abspielen bzw als Hintergrund Musik verwenden

    • [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

      Quellcode

      1. [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:

      Quellcode

      1. [FONT=monospace][FONT=Arial][B][COLOR=RoyalBlue]
      2. [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]
      3. [/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


    • Werbung zur Unterstützung des Forums ( Bitte AddBlocker deaktivieren )