Sign in to follow this  
Followers 0
francys

cancel script detect logout or shutdown

7 posts in this topic

I have a script that is running. When you log out or shutdown, the script should be stopped.

how?

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

A loop that is running

While HotKeySet ("^ h", "terminate")

...

Wend

Func Terminate ()

Exit 0

EndFunc

When the person logout or shutdown script must also be completed

Otherwise the claim saying that windows has a program running

Edited by francys

Share this post


Link to post
Share on other sites

Do you realize "While HotKeySet ("^ h", "terminate")" will be constantly setting the hotkey.

I would have thought that the script would end automatically if logging off, unless you were running as another user, that's what I meant.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

The script must end if the user logout and forget to press CTRL + H

Share this post


Link to post
Share on other sites

The help has a detailed description of this macro

I will continue searching. :graduated:

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