This AutoHotkey script isn't working for me and I son't know why.
Goal: To provide a simple way for users to log off of their Win pc's.
I'd like to put an icon (.exe) on their desktops and when they click it, be told via MsgBox their systems will log them off in xx minutes with (ok, cancel) buttons. Clicking cancel would cancel the process, clicking ok would start the countdown to log off.
What's happening is that after I click ok, I wait and wait and wait....nothing happens. I see the icon in the system tray and the process in the Task Manager, but no results (logoff). Here's script:
LogOffTime := A_Now
LogOffTime += 1, Minute
FormatTime, LogOffTime, %LogOffTime%, Time
SetTimer, LogOff, 60000
MsgBox, 49, Auto Log-off, This workstation will be logged off in 1 minute at %LogOffTime%.`nPlease click Cancel to stay logged in.