Jump to content
Sign in to follow this  
masvil

End of Windows session

Recommended Posts

masvil

Can AutoIT detect the end of a Windows session?

I have to do an action just before user shutdown/logoff.

I look at process but when user does "Start" -> "turn off computer" (or something like that, I don't know the english version) no processes seem close or open and I don't know what to see.

Edited by masvil

Share this post


Link to post
Share on other sites
this-is-me

What to do:

Open Au3Spy

Click Start - Turn off Computer

Click on a part of the window that comes up to make sure that window is in focus

Type "CTRL+ALT+F"

Press cancel

Look at the output from au3spy


Who else would I be?

Share this post


Link to post
Share on other sites
jdickens

I have this in main loop of AutoIt prog:

If WinExists("Shut Down Windows") Then
      $ScRdrIsWanted = $FALSE ;for my needs only in this example
      ExitLoop
    EndIf

Is this best way to detect Windows shutdown?

J


If I am too verbose, just say so. You don't need to run on and on.

Share this post


Link to post
Share on other sites
sugi

Why not use OnAutoItExit? Requires beta IIRC.

Share this post


Link to post
Share on other sites
Steph

Why not use OnAutoItExit? Requires beta IIRC.

<{POST_SNAPBACK}>

I could do with this function when someone logs off or shuts down (Win XP). Having tried OnAutoItExit this doesn't seen to work in these situations - any other ideas?

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  

×