nobby Posted August 4, 2004 Share Posted August 4, 2004 Could it be possible to add the "lock computer" to the shutdown function? This would be very practical when running installs etc. At present I use psshutdown.exe -l, but it would be so much more elegant to do the lot in AutoIt. Cheers Nobby CheersNobby Link to comment Share on other sites More sharing options...
pekster Posted August 4, 2004 Share Posted August 4, 2004 I know the windows key+ l will bring you to the user log in screen (which is the XP version of locking the screen.) It's been a while since I've used 2000, but this might work on that version as well. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
CyberSlug Posted August 4, 2004 Share Posted August 4, 2004 Run("rundll32.exe user32.dll,LockWorkStation") ;another methodinfo from http://www.jsiinc.com/SUBE/tip2000/rh2050.htm Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
emmanuel Posted August 4, 2004 Share Posted August 4, 2004 I know the windows key+ l will bring you to the user log in screen (which is the XP version of locking the screen.) It's been a while since I've used 2000, but this might work on that version as well. <{POST_SNAPBACK}>That doesn't work on 2k... Though does lock XP machines... Run("rundll32.exe user32.dll,LockWorkStation") ;another method info from http://www.jsiinc.com/SUBE/tip2000/rh2050.htm <{POST_SNAPBACK}>that should work for all... and cool, been meaning to look that one up. "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
nobby Posted August 5, 2004 Author Share Posted August 5, 2004 Thanks for all the relpies... Cyberslug's solution works fine on 98, ME, 2K and XP... Cheers CheersNobby Link to comment Share on other sites More sharing options...
favorini Posted August 26, 2004 Share Posted August 26, 2004 Is there a way to send keys to a window/dialog box while the screen is locked? -FF Link to comment Share on other sites More sharing options...
favorini Posted August 27, 2004 Share Posted August 27, 2004 Is there a way to send keys to a window/dialog box while the screen is locked? -FF <{POST_SNAPBACK}>After more searching I found the following posts which provide an answer: use ControlSend. http://www.autoitscript.com/forum/index.ph...wtopic=1384&hl= http://www.autoitscript.com/forum/index.ph...wtopic=2762&hl= -FF Link to comment Share on other sites More sharing options...
favorini Posted August 27, 2004 Share Posted August 27, 2004 Strange behavior with ControlSend. If I send a ":" with the screen locked it gets turned into a ";". Send("#l") Run("notepad.exe") WinWait("Untitled - Notepad") ControlSend("Untitled - Notepad","","Edit1",":;Hello from Notepad") If I comment out the first line it works as expected and ":;hello from notepad" is seen in notepad window. Otherwise, ";;hello from notepad" is there. I am running Win XP SP1 and AutoIt 3.0.102. -FF Link to comment Share on other sites More sharing options...
CyberSlug Posted August 27, 2004 Share Posted August 27, 2004 Strange behavior with ControlSend. If I send a ":" with the screen locked it gets turned into a ";". Send("#l") Run("notepad.exe") WinWait("Untitled - Notepad") ControlSend("Untitled - Notepad","","Edit1",":;Hello from Notepad") If I comment out the first line it works as expected and ":;hello from notepad" is seen in notepad window. Otherwise, ";;hello from notepad" is there. I am running Win XP SP1 and AutoIt 3.0.102. -FF <{POST_SNAPBACK}>http://www.autoitscript.com/fileman/users/pekster/pekster%27s%20scripting%20index.html Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
favorini Posted August 27, 2004 Share Posted August 27, 2004 http://www.autoitscript.com/fileman/users/pekster/pekster%27s%20scripting%20index.html <{POST_SNAPBACK}>Thanks for the link. Unfortunately, this doesn't help me, because you are using Send to change the shift state, and this doesn't work when the screen is locked. Also, I notice two things in your READ-ME.TXT: It still says "USAGE: ShiftControlSend("title", "text", "classnameNN", "string", flag)". All 5 args are required, although it sounds like flag is optional when you say 0 is the default behavior. -FF Link to comment Share on other sites More sharing options...
favorini Posted August 27, 2004 Share Posted August 27, 2004 Upon further inspection, I guess you aren't the author, so you can ignore my nitpicking. :"> A possible solution: if the control is an Edit control, the following seems to work. ControlCommand ("Untitled - Notepad","","Edit1","EditPaste",':;Hello') Is this issue with ControlSend not being able to send SHIFTed characters considered a bug, or is it a feature? -FF 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