litlmike Posted April 14, 2006 Share Posted April 14, 2006 I never thought of asking this before, but is it possible to call two commands at once, or together? I would like to play both these at the same time. MsgBox (4096, "Done", "Thank You! Come Again!", 10) SoundPlay ($Apu_Wav,1) _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
Valuater Posted April 14, 2006 Share Posted April 14, 2006 try this SoundPlay ($Apu_Wav) MsgBox (4096, "Done", "Thank You! Come Again!", 10) 8) Link to comment Share on other sites More sharing options...
Simucal Posted April 14, 2006 Share Posted April 14, 2006 Bah, you beat me to it Valuater! AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
litlmike Posted April 14, 2006 Author Share Posted April 14, 2006 try this SoundPlay ($Apu_Wav) MsgBox (4096, "Done", "Thank You! Come Again!", 10) 8)Lol! Smart Alex...Yea I will say that it is better, but I was hoping for it to run exactly at the same time. The MsgBox happens after the sound file is done. It isn't the end of the world if there is no better way, but it would be nice. _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
Simucal Posted April 14, 2006 Share Posted April 14, 2006 Only one command can be run at a time, per script. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
Valuater Posted April 14, 2006 Share Posted April 14, 2006 Lol! Smart Alex...Yea I will say that it is better, but I was hoping for it to run exactly at the same time. The MsgBox happens after the sound file is done. It isn't the end of the world if there is no better way, but it would be nice.I'm not Alex.. but thanks ( just... Valuater )you could create you own message box and the sound will play... but what i gave you is pretty close without creating an extra GUI8) Link to comment Share on other sites More sharing options...
litlmike Posted April 14, 2006 Author Share Posted April 14, 2006 I'm not Alex.. but thanks ( just... Valuater )you could create you own message box and the sound will play... but what i gave you is pretty close without creating an extra GUI8)THanks for the input. Btw, I know you are not Alex. Smart Alex was better Smart A@@ _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
evilertoaster Posted April 14, 2006 Share Posted April 14, 2006 THanks for the input. Btw, I know you are not Alex. Smart Alex was better Smart A@@I was always told "smart Aleck" Link to comment Share on other sites More sharing options...
greenmachine Posted April 15, 2006 Share Posted April 15, 2006 I was always told "smart Aleck" But if you pluralize that it definitely sounds like Alex... so I can see where he got it. Link to comment Share on other sites More sharing options...
Richard Robertson Posted April 15, 2006 Share Posted April 15, 2006 AutoIt may get a multithreaded procedure. It may not. Multithreading is what you are asking about. Only a single command may be executed on a single thread at a time. If you have more than one thread, you can run more than one command. Link to comment Share on other sites More sharing options...
herewasplato Posted April 15, 2006 Share Posted April 15, 2006 (edited) ...The MsgBox happens after the sound file is done...This is the best that I could do:; Message Box with Sound ; Author - herewasplato _MsgBoxSound(0, "Done", "Thank You! Come Again!", "C:\WINDOWS\Media\tada.wav", 10) Func _MsgBoxSound($MBFlag, $MBTitle, $MBText, $MBSound, $timeout) Local $file = FileOpen(EnvGet("temp") & "\MBSound.au3", 2) If $file = -1 Then MsgBox(0, "", "Error opening file.") Local $line1 = 'AutoItSetOption(' & '"WinWaitDelay", 0' & ')' Local $line2 = 'WinWait("' & $MBTitle & '", "' & $MBText & '")' Local $line3 = 'SoundPlay("' & $MBSound & '", 1)' FileWrite($file, $line1 & @CRLF & $line2 & @CRLF & $line3) FileClose($file) Run(@AutoItExe & " /AutoIt3ExecuteScript " & EnvGet("temp") & "\MBSound.au3") MsgBox($MBFlag, $MBTitle, $MBText, $timeout) While Not FileDelete(EnvGet("temp") & "\MBSound.au3") Sleep(10) WEnd EndFunc ;==>_MsgBoxSoundEdit: Requires beta... Edited April 15, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
cal Posted April 18, 2006 Share Posted April 18, 2006 Or just call an external program with the run command, Say like windows media player and pass it the location of an mp3. Then pop up the mesg box. I find I have to make the script pause 5 seconds before displaying the mesg box or it will pop under the media player instead of on top. when the ok button is press then close the media player. This is what I do. Granted, doing it like that does not have everything self contained within the script but it works fine. If you truely needed it self contained you could compile it and use the include command. You could likely include a small mp3 and an external small player. I've not bothered taking it that far myself. Link to comment Share on other sites More sharing options...
neogia Posted April 18, 2006 Share Posted April 18, 2006 AutoIt may get a multithreaded procedure. It may not. Multithreading is what you are asking about. Only a single command may be executed on a single thread at a time. If you have more than one thread, you can run more than one command.It already has one... sort of.. [u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia 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