lijun0238 0 Posted November 6, 2006 How to stop runwait Share this post Link to post Share on other sites
Xenobiologist 35 Posted November 6, 2006 How to stop runwaitHi,maybe ablibEnable to check a time out and count it up, or using a Hotkey could help.So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Share this post Link to post Share on other sites
PaulIA 1 Posted November 6, 2006 How to stop runwaitHow about killing the process that's running? Auto3Lib: A library of over 1200 functions for AutoIt Share this post Link to post Share on other sites
jvanegmond 300 Posted November 6, 2006 use Run and make it Wait in your custom loop. github.com/jvanegmond Share this post Link to post Share on other sites
lijun0238 0 Posted November 6, 2006 How about killing the process that's running?yes Share this post Link to post Share on other sites
PaulIA 1 Posted November 6, 2006 yesUh... Yes what? AdlibEnable("TimeOut", 3000) RunWait("NotePad.exe") Func TimeOut() $PID = ProcessExists("notepad.exe") If $PID Then ProcessClose($PID) EndFunc Auto3Lib: A library of over 1200 functions for AutoIt Share this post Link to post Share on other sites
Jos 1,565 Posted November 6, 2006 Or this way (is a bit saver...) $pid = Run("NotePad.exe") Sleep(3000) If ProcessExists($pid) Then ProcessClose($PID) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
/dev/null 1 Posted November 6, 2006 Uh... Yes what? AdlibEnable("TimeOut", 3000) RunWait("NotePad.exe") Func TimeOut() $PID = ProcessExists("notepad.exe") If $PID Then ProcessClose($PID) EndFunc That will probably kill the wrong notepad process, if there are more instances of it. Better use WMI to get the process IDs of all notepad.exe and the corresponding parent process IDs. Then compare the AutoIT PID with the parent process id. Only if those match, you know you've found the right process. You need to check that only once in the Adlib function (implement it via a global flag). Then check if the Process exists for a specified amount of time. If necessary kill it, as you've shown above. WMI Link: http://www.autoitscript.com/forum/index.ph...st&p=256901 Cheers Kurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Share this post Link to post Share on other sites
PaulIA 1 Posted November 6, 2006 It was just an example. I figured if he can't crawl, teaching him to run is fairly futile. Auto3Lib: A library of over 1200 functions for AutoIt Share this post Link to post Share on other sites
Valik 473 Posted November 6, 2006 lijun0238, since you used the "Report" feature to notify the moderators about this thread, I can only assume you want it locked. And if your intention, like I suspect, is to draw attention to this thread, then you deserve to have your thread locked. Click. Share this post Link to post Share on other sites