Jump to content

Hotkey Log Off


Recommended Posts

helpfile:

(remarks on the ShutDown command)

Remarks

The shutdown code is a combination of the following values:

0 = Logoff

1 = Shutdown

2 = Reboot

4 = Force

8 = Power down

32= Suspend

64= Hibernate

0 = logoff

~cdkid

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

how do i set a hotkey to log me off, i dont want the dialog to switch users, i want to log off!

hotkeyset("#l","logoff")

while 1
sleep(200)
WEnd

func logoff()
    shutdown(4)
EndFunc
Try setting the hotkey to something other than WIN+L, since that's the windows hotkey for switching users.
Link to comment
Share on other sites

Try this script. It's set to logoff using {F5} as the hotkey.

HotKeySet( "{F5}", "_logoff")

While 1

sleep(10000)

Wend

Func _logoff ()

send("{altdown}{altup}")

sleep(250)

send("{lwindown}{lwinup}")

sleep(250)

send("{up}")

sleep(50)

send("{up}")

sleep(50)

send("{up}")

sleep(50)

send("{enter}")

sleep(750)

send("logoff")

sleep(250)

send("{enter}")

EndFunc;==>_Open

Link to comment
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
 Share

  • Recently Browsing   0 members

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