Jump to content

How do I unload my script?


RussMuss
 Share

Recommended Posts

Hi

how do I unload my script rather than log out and log back in again?

thanks Russ

Well, first you don't provide enough details.

Assuming that you mean you want to exit the script, just put Exit on the line where you need the script to quit.

If script hangs then you need to post your code for us to see what's going on.

Live and Learn, 'cause Knowledge is Super Power.
Link to comment
Share on other sites

I have a script that automatically clicks the okay button on a dialog box that pops up when we print. The dialag box has an edit box that captures the job number. Usually we just hit the okay button and go with the default job number. The script works okay but sometimes I want to turn it off (unload the script) so the dialog boxes will not be "okayed" How can I unload it so it doesn't run?

thanks Russ

Link to comment
Share on other sites

#include <Misc.au3>
Global $pause
HotKeySet("{ESCAPE}","check")
While 1 
    Sleep(1000)
WEnd
Func check()
    $pause = Not $pause
    While $pause
        Send("a")
        If WinExists("Equitrac Office") Then ControlClick("Equitrac Office","","Button3")
        If WinExists("Cost Preview") Then ControlClick("Cost Preview","","Button2")
        If WinExists("Popup Launcher") Then ControlClick("Popup Launcher","","Button2")
        sleep(200)
    WEnd
EndFunc

Edited by Thatsgreat2345
Link to comment
Share on other sites

Hi I meant the code on this thread (post #4) from "thatisgreat2345"

Try the simple version and use the icon in the system tray to pause/unpause/exit the script:
While 1
    If WinExists("Equitrac Office") Then _
            ControlClick("Equitrac Office", "", "Button3")
    If WinExists("Cost Preview") Then _
            ControlClick("Cost Preview", "", "Button2")
    If WinExists("Popup Launcher") Then _
            ControlClick("Popup Launcher", "", "Button2")
    Sleep(100)
WEnd
Also, I do not know how the Send("a") line comes into play here? It is in thatisgreat2345's code in this thread. It is sent all of the time. I left it out of this simple version. Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Ah thanks! now I understand how to exit my code using the system try icon. That is a great help. I will stick to the simplified code as you have given as it works fairly well.

cheers Russ

and thanks to every other poster also

MERRY CHRISTMAS!!!!!!!!!!!!!!

:-)

Edited by RussMuss
Link to comment
Share on other sites

ahahah i was testing my pause unpause lol and i was doing it with send a xD forgot to take it out

I thought that it might have been something like that - or - that I missed something as I tried to follow the progression of this code across multiple threads. Thanks for all of your great help in the forum.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Ah thanks! now I understand how to exit my code using the system try icon. That is a great help. I will stick to the simplified code as you have given as it works fairly well.

cheers Russ

and thanks to every other poster also

MERRY CHRISTMAS!!!!!!!!!!!!!!

:-)

Glad you got it working. Don't be a stranger to the forum.

[size="1"][font="Arial"].[u].[/u][/font][/size]

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...