Sign in to follow this  
Followers 0
RussMuss

How do I unload my script?

14 posts in this topic

Hi

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

thanks Russ

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

#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

Share this post


Link to post
Share on other sites

Also, there should be a little circle that appears in your system tray (Down by your clock) that has an A on it... if you right click that and click "Exit" it'll do the trick too.

Share this post


Link to post
Share on other sites

...if you right click that and click "Exit" it'll do the trick too.

...if you left click too :-)

One click (right or left) pauses the script and brings up a menu to exit or to unpause the script.


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

Share this post


Link to post
Share on other sites

thanks yes - but now it does not go beyond the first dialog box. I just get an hour glass

Russ

Share this post


Link to post
Share on other sites

...but now it does not...

What code is "it"? The code in this thread with the hotkey defined? ...or are you running the code from your last thread?

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

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]

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
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]

Share this post


Link to post
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]

Share this post


Link to post
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
Sign in to follow this  
Followers 0