Jump to content

How to send text to a specific window ?


Recommended Posts

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

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 by Burrup

qq

Link to comment
Share on other sites

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...