Jump to content

Recommended Posts

Posted (edited)

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
Posted

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?
  • 1 month later...
Posted

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.

Posted

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?

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
  • Recently Browsing   0 members

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