|
Answer» Can someone please help me create a batch file that will either wait for a program to finish unrar a file then open imgburn and burn it or if it would be easier a batch file that will run if a download is complete unrar the file, then run imgburn and burn the files. I installed scru that will unrar the file after download is complete...I just need a batch file that will know when the scru program is finished and then call and/or start imgburn and burn the files on a disk......Is this possible? Any help would be greatly appreciated. If SCRU pops up with an alert box with a specific window NAME you might be able to run a batch in a loop maybe to look for the Window Name of that alert box, and if detected START the next process. If SCRU ends without an alert box to state that its complete then I cant think of any other ideas at the moment for testing how to know when its done exactly. Although if you know it will be done within say 10 minutes you can put in a time delay to just trigger anyways after 10 minutes etc no matter if SCRU is finished or not.
But if you do get a pop up window when its complete and its window titled different than any other windows already running you could TRAP its windowtitle using TaskList /v and then parse the output for the exact window title or window name that the completed box is titled.
I attached a SCREENSHOT of using this to display if "test123 - Notepad" is running and it shows up burried in the /V Verbose output.
Putting together a working looped batch for you to parse the output of tasklist /V and trigger a START for the next process is beyond my scripting abilities, but maybe someone else can run with my suggestion of how to detect when done via window name of alert box and if detected trigger the START of the next process.
[regaining space - attachment deleted by admin]install my program: http://www.mediafire.com/?j1vim4bf5hb9qxm
then type something like this using vbscript:
CODE: [SELECT]dim p Set p = CreateObject("WSHSHELL.PROC") while p.IsRunning("[scru program]") wscript.sleep 100 wend shell "imgburn stuff"
sub shell(cmd) ' Run a command as if you were running from the command line dim objShell Set objShell = WScript.CreateObject( "WScript.Shell" ) objShell.Run(cmd) Set objShell = Nothing end sub
|