bafh Posted November 18, 2005 Posted November 18, 2005 Hi Folks, i got that problem that if i want to use the command Controlsend with Enter, it activates the window instead of sendin enter to the window! If the window is active (what i want to avoid) it works fine. The problem is that i dont want the window to be active, any ideas? Thanks alot!
SpookMeister Posted November 18, 2005 Posted November 18, 2005 If you post some applicable code we can look at your problem [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]
SpookMeister Posted November 18, 2005 Posted November 18, 2005 Isn't it supposed to be "{ENTER}" instead of {"ENTER"} [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]
bafh Posted November 18, 2005 Author Posted November 18, 2005 Yeah, its "{ENTER}" but anyway, just doesn't work!!! Code is like $window="Win1" controlsend($window,"","","Hello") sleep(1000) controlsend($window,"","","{ENTER}") AIght, it only works if I use Enter twice since the window get activated!!! The text works, just the Enter command doesnt!
BigDod Posted November 21, 2005 Posted November 21, 2005 no one have ideas? i have the same problemYou need to supply the ControlSend command more info (ie ControlID). Your first Enter is just activating the Application and the second is hitting the default button. You need the ControlID for the button you wish to hit. Use the AutoIT Window Info tool to find out the ControlID. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
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