slightly_abnormal Posted April 4, 2006 Share Posted April 4, 2006 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 Link to comment Share on other sites More sharing options...
cdkid Posted April 4, 2006 Share Posted April 4, 2006 helpfile:(remarks on the ShutDown command)RemarksThe shutdown code is a combination of the following values:0 = Logoff1 = Shutdown2 = Reboot4 = Force8 = Power down32= Suspend64= Hibernate0 = 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 More sharing options...
bucky002 Posted April 5, 2006 Share Posted April 5, 2006 What is the number for switch user? Link to comment Share on other sites More sharing options...
greenmachine Posted April 5, 2006 Share Posted April 5, 2006 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 More sharing options...
coolness Posted April 5, 2006 Share Posted April 5, 2006 Try this script. It's set to logoff using {F5} as the hotkey.HotKeySet( "{F5}", "_logoff")While 1sleep(10000)WendFunc _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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now