Jump to content

Closing secondary au3 script


-TS-
 Share

Recommended Posts

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

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

.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

.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

"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 by -TS-
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...