Sign in to follow this  
Followers 0
sl_alagappan

ControlSetText

9 posts in this topic

I need to pass on some text to a control and to press the ENTER key after the text.

When I use ControlSetText, I can'g send the ENTER key press.

command line as below:

ControlSetText ($ChildWindowTitle,$ChildWindowText, "fp32DateTime2x1", 

$Var & asc(13))

any other way to send the text and the ENTER key press at the end of the text?

Share this post


Link to post
Share on other sites



need to send text along with ENTER key press at the end of text to an edit control also.

Bothg controlsend and ControlSetText fail to pass the ENTER key at the end of the text to the edit control.

any other way?

:whistle:

Share this post


Link to post
Share on other sites

ControlSend and ControlSetText only send alpha-numberic characters and don't send control characters.

You can try a regular send if the appropriate control has focus; however, this won't work if the window/control is hidden...


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

the corresponding window may or may not be active.

that's the problem...

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

ControlSetText($title, $text, "fp32DateTime2x1", $Var & @CRLF)

EDIT: Hmm, this works in Notepad but not in, say, a set Font window. Is there no button you can click to submit the change?

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

upon sending the ENTER key, application validation is done and some other fields are filled up with respective data. So, it is necessary to send the ENTER key press after the text.

Share this post


Link to post
Share on other sites

I don't think so....

I think when you hit the enter key, you are really activating some default hidden control (kind of like an OK key, that has focus, but is hidden)

Find out the name of that control and you can activate it even whe it's hidden.


[quote]I was busy waiting all night for the Columbus Day Bunny to come down my chimney and light fireworks in my pumpkin.There's so much wrong with that.Oh, I'm sorry, i forgot you were Jewish.[/quote]

Share this post


Link to post
Share on other sites

there is no hidden buttons.

it is the normal practice of databse programming.

upon pressing the ENTER key, application validates the current field data and fills up other relevant fields accordingly.

Share this post


Link to post
Share on other sites

Can do a setEnter()

Share this post


Link to post
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
Sign in to follow this  
Followers 0