Xenobiologist Posted November 6, 2006 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
PaulIA Posted November 6, 2006 Posted November 6, 2006 How to stop runwaitHow about killing the process that's running? Auto3Lib: A library of over 1200 functions for AutoIt
jvanegmond Posted November 6, 2006 Posted November 6, 2006 use Run and make it Wait in your custom loop. github.com/jvanegmond
lijun0238 Posted November 6, 2006 Author Posted November 6, 2006 How about killing the process that's running?yes
PaulIA Posted November 6, 2006 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
Developers Jos Posted November 6, 2006 Developers 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 etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
/dev/null Posted November 6, 2006 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 *
PaulIA Posted November 6, 2006 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
Valik Posted November 6, 2006 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.
Recommended Posts