sl_alagappan Posted April 13, 2005 Share Posted April 13, 2005 I hv an application whereby there are some controls for which I am not able to send the required text using AutoitX/VB. So, I would like to send the text to the required window using window title/text. Can I send any text to any required window with specific window title/text. send() is not useful for this purpose. Link to comment Share on other sites More sharing options...
buzz44 Posted April 13, 2005 Share Posted April 13, 2005 (edited) ControlSend ( "title", "text", controlID, "string" [, flag] ) eg. ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window") From the help file. Use the AutoIt Window Info Tool to get the controlID. Edited April 13, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
sl_alagappan Posted April 15, 2005 Author Share Posted April 15, 2005 ControlSend ( "title", "text", controlID, "string" [, flag] )eg.ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window")From the help file. Use the AutoIt Window Info Tool to get the controlID.<{POST_SNAPBACK}>The control ID does not work. The application has a grid whereby a single text box is used to get input from all required input.So, I need to send text to the required window withou mentioning the control id. Link to comment Share on other sites More sharing options...
buzz44 Posted April 15, 2005 Share Posted April 15, 2005 I suppose you could just give focus to the window and send it. WinActivate ( "title") Send("test") qq Link to comment Share on other sites More sharing options...
sl_alagappan Posted April 15, 2005 Author Share Posted April 15, 2005 I suppose you could just give focus to the window and send it.WinActivate ( "title") Send("test")<{POST_SNAPBACK}>While appreciating your efforts to answer my prob, pl note that the send command is not useful at this application since I need to send to the exact required window.By the time, send command sends, any other window could become active window.Fyi, I hv been asking for such facility for a long time ( to send any text to the required window title/text without specifying any control name.I believe, the experts at AutoIt Developer forum will find some time and way to resolve this.Regards Link to comment Share on other sites More sharing options...
jpm Posted April 15, 2005 Share Posted April 15, 2005 While appreciating your efforts to answer my prob, pl note that the send command is not useful at this application since I need to send to the exact required window.By the time, send command sends, any other window could become active window.Fyi, I hv been asking for such facility for a long time ( to send any text to the required window title/text without specifying any control name.I believe, the experts at AutoIt Developer forum will find some time and way to resolve this.Regards<{POST_SNAPBACK}>We do our best (at least I think) but ControlSend is and improvement that other scripting language don't have. It need some more information that's the reason of the ControlID necessity Link to comment Share on other sites More sharing options...
buzz44 Posted April 15, 2005 Share Posted April 15, 2005 Maybe the controlID should be an optional parametre. qq Link to comment Share on other sites More sharing options...
jpm Posted April 15, 2005 Share Posted April 15, 2005 some control should be reference so controlID is a necessity. AutoIt cannot decide which one. Use send for this purpose Burgaud 1 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