Phlegm Posted October 11, 2010 Share Posted October 11, 2010 (edited) I have a window I need to send an ENTER key to finsih an install. I need to do this while the PC is not logged in (the PC will be at the CTL ALT DEL screen) The Autoit v3 Window info shows the following: Title: NexGen Class: #32770 Under the Control Tab Class: Static Text: "Your computer must be.." ID: 65535 Under the Window Tab Title: NextGen Class: #32770 I have this as the command ControlSend("NextGen", "Your computer must be restarted to complete the update. Restart now?", "65535", "{ENTER}") Please let me know what I'm missing... Thanks Edited October 11, 2010 by Phlegm Link to comment Share on other sites More sharing options...
wakillon Posted October 11, 2010 Share Posted October 11, 2010 Try ControlSend("NextGen", "Your computer must be restarted to complete the update. Restart now?", 65535, "{ENTER}") or ControlSend("NextGen", "Your computer must be restarted to complete the update. Restart now?", "[CLASS:#32770]", "{ENTER}") AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Phlegm Posted October 11, 2010 Author Share Posted October 11, 2010 Darn, These did not work. I think need to add command to make the window active: ControlFocus("NextGen", "Your computer must be restarted to complete the update. Restart now?", "65535") ControlSend("NextGen", "Your computer must be restarted to complete the update. Restart now?", "65535", "{!Y}") Still doen't work any sugestions? Link to comment Share on other sites More sharing options...
wakillon Posted October 11, 2010 Share Posted October 11, 2010 Darn,These did not work.I think need to add command to make the window active:ControlFocus("NextGen", "Your computer must be restarted to complete the update. Restart now?", "65535")ControlSend("NextGen", "Your computer must be restarted to complete the update. Restart now?", "65535", "{!Y}")Still doen't work any sugestions?yes window must be active !try winwait and winactivate functions... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
BrewManNH Posted October 11, 2010 Share Posted October 11, 2010 You can't make the window active if the screen is locked, or you're at the Log In screen. BTW, I noticed that your window title, as shown in your first post, is listed as NextGen in one place and NexGen in another. Make sure your window title is correct first. Second, you might want to shorten the text parameter for the window you're searching for unless you're positive that the text you have listed is what is actually showing in the window info tool. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Phlegm Posted October 11, 2010 Author Share Posted October 11, 2010 I was told the Control function will work even if the pc is at teh CTL ALT DEl id this correct? Thanks Link to comment Share on other sites More sharing options...
GMK Posted October 11, 2010 Share Posted October 11, 2010 You might try using ControlClick instead. Also, try either "[iD:65535]" for the ID, or just 65535 (without quotes). Link to comment Share on other sites More sharing options...
Phlegm Posted October 11, 2010 Author Share Posted October 11, 2010 (edited) This works.... ControlFocus("NextGen", "&Yes", "6") ControlClick("NextGen", "", "[iD:6]") Thanks all.... Edited October 11, 2010 by Phlegm 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