-TS- Posted August 6, 2009 Share Posted August 6, 2009 Ran into little more trouble with remote scripts. Im trying to get a script to close a secondary script, but Im having some diffcultys.. I made two test scripts just to see what or what doesnt work. Ive yet to find any.. Im probably missing an easy command or over looked something. sleep(1000) ProcessClose("a.au3") WinKill("a.au3") WinClose("a.au3") ToolTip("waiting",1,1) sleep(600000) Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 6, 2009 Share Posted August 6, 2009 Ran into little more trouble with remote scripts. Im trying to get a script to close a secondary script, but Im having some diffcultys.. I made two test scripts just to see what or what doesnt work. Ive yet to find any.. Im probably missing an easy command or over looked something. sleep(1000) ProcessClose("a.au3") WinKill("a.au3") WinClose("a.au3") ToolTip("waiting",1,1) sleep(600000) The *.au3 file is not executable. It gets interpreted by AutoIt3.exe at run time, so that's the name of the process. If you compiled your script, it would become "a.exe" and that would also be the process name that could be closed. >_< Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
-TS- Posted August 6, 2009 Author Share Posted August 6, 2009 .exe from autoit collides with other programs running on background. I would like to avoid doing that, also its a pain having to delete the old .exe/edit/compile the script for each little change. With the two scripts running, they would both be process name 'AutoIt3.exe', would there be a way to determon which is which? Right now Im using a short command loop on both scripts, which isnt all that great because I can only run this script soo many times without having it every other line This on the main script If $login = "true" IniWrite("Log.ini","Core","cls","1") Relog() EndIf Then this on the secondary script, after every major loop/func $exit = IniRead("Log.ini","Core","cls","0") If $exit = 1 Then IniWrite("Log.ini","Core","cls","0") Exit EndIf It works... decently, but I need to have these 5 lines of codes every 10 lines, a 8000 line script will get increased much larger fast... Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 6, 2009 Share Posted August 6, 2009 .exe from autoit collides with other programs running on background. I would like to avoid doing that, also its a pain having to delete the old .exe/edit/compile the script for each little change. With the two scripts running, they would both be process name 'AutoIt3.exe', would there be a way to determon which is which? Right now Im using a short command loop on both scripts, which isnt all that great because I can only run this script soo many times without having it every other line This on the main script If $login = "true" IniWrite("Log.ini","Core","cls","1") Relog() EndIf Then this on the secondary script, after every major loop/func $exit = IniRead("Log.ini","Core","cls","0") If $exit = 1 Then IniWrite("Log.ini","Core","cls","0") Exit EndIf It works... decently, but I need to have these 5 lines of codes every 10 lines, a 8000 line script will get increased much larger fast... You just need to signal the script to close itself. That can be watched by an AdLib function, or signaled with a GUI event (hint: it can be a hidden GUI). There is also the WM_COPYDATA message (search the forum for examples). If you are working with 8000 line scripts though, it's pretty wussy to whine about how hard it is to compile your scripts... >_< Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
-TS- Posted August 6, 2009 Author Share Posted August 6, 2009 (edited) "If you are working with 8000 line scripts though, it's pretty wussy to whine about how hard it is to compile your scripts..." I was just stating that the way I am currently fiddling around with to remotely close the script puts alot of unnecessary commands inside the script... But Ill try then AdLib command. Also, isnt it the same complextivity to compile a 1 line script or a few thousand? Right click> Compile script.. Im trying to avoid the compiling, if you didnt read. High-horseness Edited August 6, 2009 by -TS- Link to comment Share on other sites More sharing options...
Skruge Posted August 6, 2009 Share Posted August 6, 2009 Real easy, just a simple modification to the code you first posted... ; Script to be closed AutoItWinSetTitle("CloseMe") ToolTip("waiting",1,1) sleep(600000) ; Script that closes it sleep(1000) WinClose("CloseMe") [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 6, 2009 Share Posted August 6, 2009 High-horseness >_< I like Skruge's idea even better, though. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
-TS- Posted August 7, 2009 Author Share Posted August 7, 2009 Real easy, just a simple modification to the code you first posted... ; Script to be closed AutoItWinSetTitle("CloseMe") ToolTip("waiting",1,1) sleep(600000) ; Script that closes it sleep(1000) WinClose("CloseMe") always an easy fix, just needs someone elses prospective, Thanks lots Skruge 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