boogieoompa Posted June 27, 2006 Share Posted June 27, 2006 I am trying to close and relaunch one of my compiled scripts (with updates) but processclose seems to lag. So I added a splash screen while it is closing but it seems to wait until the splash screen disappears. Is this a glitch or am I doing something wrong? Thanks, ProcessClose("myscript.exe") MsgBox (0,"Relaunch","Please wait while your changes are updated",10) Run("myscript.exe") Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 27, 2006 Moderators Share Posted June 27, 2006 I am trying to close and relaunch one of my compiled scripts (with updates) but processclose seems to lag. So I added a splash screen while it is closing but it seems to wait until the splash screen disappears. Is this a glitch or am I doing something wrong? Thanks, ProcessClose("myscript.exe") MsgBox (0,"Relaunch","Please wait while your changes are updated",10) Run("myscript.exe")Out of curiousity, if you close your process, it stops at that line, how do you expect to get the msgbox and run to work? Open SciTe and run these 2 lines:ProcessClose('AutoIt3.exe') MsgBox(0,'Info','If you got this msgbox I am impressed') If you want to restart your script, MHz did one not to long ago. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted June 27, 2006 Share Posted June 27, 2006 If you want to restart your script, MHz did one not to long ago.see Autoit Wrappers for re-start ( in my sig below )8) Link to comment Share on other sites More sharing options...
boogieoompa Posted June 27, 2006 Author Share Posted June 27, 2006 Actually I have two scripts running one of which is editing the other. Effectivly when the editing script is finished I want to relaunch the other script. Link to comment Share on other sites More sharing options...
herewasplato Posted June 27, 2006 Share Posted June 27, 2006 (edited) ...while it is closing but it seems to wait until the splash screen disappears...If the first "it" refers to "myscript.exe" then that is working as you scripted.If the second "it" is your "editing script", then that script is also working as you coded.After your MsgBox (not splash screen) is closed or times out, "myscript.exe" will run.What is the problem... please restate your question.You might also want to take a look at /AutoIt3ExecuteScript:http://www.autoitscript.com/forum/index.ph...showtopic=22531 Edited June 27, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
boogieoompa Posted June 27, 2006 Author Share Posted June 27, 2006 Sorry I could have phrased this a little better, effectivly the Processclose command does not execute before the msgbox or run command works. Basically the msgbox is running while the other script is running (even though it should have already been closed). When the run command is executed there are two incedences of the script (one of which closes out after a second or so) Link to comment Share on other sites More sharing options...
Nomad Posted June 27, 2006 Share Posted June 27, 2006 Sorry I could have phrased this a little better, effectivly the Processclose command does not execute before the msgbox or run command works. Basically the msgbox is running while the other script is running (even though it should have already been closed). When the run command is executed there are two incedences of the script (one of which closes out after a second or so) ProcessWaitClose()? Nomad Link to comment Share on other sites More sharing options...
herewasplato Posted June 27, 2006 Share Posted June 27, 2006 Like Nomad mentioned, there is ProcessWaitClose() ...from the help file on ProcessWaitClose:The process is polled approximately every 250 millisecondsor if you are in a hurry:Do ProcessClose("myscript.exe") Sleep(10) Until Not ProcessExists("myscript.exe") [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
boogieoompa Posted June 27, 2006 Author Share Posted June 27, 2006 Thanks, I feel pretty dumb for having over looked that. It is still kind of wierd that it takes that long. Thanks again Link to comment Share on other sites More sharing options...
boogieoompa Posted June 28, 2006 Author Share Posted June 28, 2006 Just so every knows (if anyone cares) the task tray has a lag from the process list so when a process is killed it still looks like it is running for a few seconds. Just an FYI. 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