computergroove Posted June 3, 2008 Share Posted June 3, 2008 I have a bit of code that plays a video. I need something to replace 'Sleep(1000)'. I have Mplayer.exe set to autoclose after the video has played to the end. What I want to do is make the program wait until mplayer2 closes and then WinActivate("Scan Barcode"). I figure I could do this with a GUIGetPixel but I want to know if there is a way for Autoit to monitor open processes and trigger an event when one closes. $video_file = (@ScriptDir & "\" & IniRead("barcode.ini", "AviCodes", $user_input, "no entry")) Run (@ProgramFilesDir & "\Windows Media Player\mplayer2.exe /play /fullscreen /close "&$video_file&"") Sleep (1000) WinActivate("Scan Barcode") GUICtrlSetData($edit_field, "");erases not successful input Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
enaiman Posted June 3, 2008 Share Posted June 3, 2008 Use RunWait instead of simple Run SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
computergroove Posted June 3, 2008 Author Share Posted June 3, 2008 Worked. Thanks Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html 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