Enforcer Posted March 1, 2009 Share Posted March 1, 2009 Got simple script: ;AdlibEnable("Play", 1500) Global $Paused HotKeySet("x", "playxxx") HotKeySet("y", "play") While 1 Sleep(100) WEnd Func Play() SoundPlay("YYY.wav",0) EndFunc Func Playxxx() SoundPlay("XXX.wav",0) EndFunc And have 2 problems: 1) don't know how to make 2 or more sounds that will play at one time ? 2) how to create 2 or more loops that will play continuosly ? Didn't find enything on Autoit HElp file and on Autoit forums 2 [RU] Zone Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted March 1, 2009 Share Posted March 1, 2009 1. To play multiple sounds simultaneously use _SoundOpen() on both files and then play them with _SoundPlay(). These can be found under "Sound Management" in the helpfile. 2. You want what? Loop the sounds? Use loop _SoundStatus() and when it is "stopped" then play it again .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 1, 2009 Moderators Share Posted March 1, 2009 (edited) Enforcer,Use the include file Sound.au3 to play sounds - it is much more flexible than SoundPlay. This works for me:#include <Sound.au3> $hMusic_handle1 = _SoundOpen("L:\Digital Music\Beck, Jeff\Performing This Week\04-Cause We're Ended As Lovers.mp3") $hMusic_handle2 = _SoundOpen("L:\Digital Music\Umphrey's McGee\06-Mantis\04-Cemetery Walk.mp3") SoundSetWaveVolume(100) _SoundPlay($hMusic_handle1) Sleep(5000) ; just so you can see it plays both! _SoundPlay($hMusic_handle2) While 1 Sleep(100) WEndM23Edit: The Admiral is a much faster typist than I am! Edited March 1, 2009 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Enforcer Posted March 2, 2009 Author Share Posted March 2, 2009 Thx for answer. I think this will solve my problems [RU] Zone Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now