Term!nX Posted June 7, 2007 Share Posted June 7, 2007 (edited) Hi ther! I have got a big problem with ControlSend. I want to send inputs to multiple windows.. So I createt a handle to each of the windows. But when i run the script it sometimes sends to the right windows, and sometimes (crap.. most of the time) it sends inputs to the wrong window. Example: global const $handle1 = WinGetHandle("Window1") global const $handle2 = WinGetHandle("Window2") ControlSend($handle1, "", "", "sometext") ;There is no text in the window ControlSend($handle2, "", "", "moretext") ;same here The problem is, when i run the script, it sends both inputs to Window2. In my eyes this is impossible, because one handle can not refer to 2 windows at once. Edited June 7, 2007 by Term!nX Link to comment Share on other sites More sharing options...
ResNullius Posted June 7, 2007 Share Posted June 7, 2007 (edited) It's a known behaviour of ControlSend() when used with "empty" control names. See http://www.autoitscript.com/forum/index.ph...st&p=352662 .Workarounds: 1) Specify the Control Name in the ControlSend() command2) If no controls exist on the window to specify, then either activate the Window you want to send to first or3) Use "Send()" instead. In short, without specifying a Control name, you have to activate the window Edited June 7, 2007 by ResNullius Link to comment Share on other sites More sharing options...
Shevilie Posted June 7, 2007 Share Posted June 7, 2007 Try the newest beta and see if that helps Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit 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