Penisaurus Posted March 13, 2010 Share Posted March 13, 2010 I've looked over shutdown(), but I can't seem to find the code so it locks my computer..Is there one? Is it named something else? These are the ones I found in the help file:0 = Logoff1 = Shutdown2 = Reboot4 = Force8 = Power down16= Force if hung32= Standby64= Hibernate Link to comment Share on other sites More sharing options...
dani Posted March 13, 2010 Share Posted March 13, 2010 You can use PsShutdown to automate this. Link to comment Share on other sites More sharing options...
Penisaurus Posted March 13, 2010 Author Share Posted March 13, 2010 You can use PsShutdown to automate this.So I'm guessing you can't do it regularly?I wanted to set a hot key type loop so I could press F2 anytime and it would lock my computer. Link to comment Share on other sites More sharing options...
dani Posted March 13, 2010 Share Posted March 13, 2010 Well sure, you can just set a hotkey which will call psshutdown.exe -l using ShellExecute or an equivalent function.Btw you do know you can lock your computer using WIN + L, right? Link to comment Share on other sites More sharing options...
Yoriz Posted March 13, 2010 Share Posted March 13, 2010 I just been playing around with learning basics of dll's from Tutorial on dllcall and one of them just happens to be lockworkstation so here it is DllCall ("User32.dll","BOOL","LockWorkStation") GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF. Link to comment Share on other sites More sharing options...
electrico Posted March 14, 2010 Share Posted March 14, 2010 + this (Hardcode method) : $string = String("rundll32.exe user32.dll,LockWorkStation") Run($string, "", @SW_HIDE) 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