Sign in to follow this  
Followers 0
frank10

ControlSend has problem with Text input

3 posts in this topic

#1 ·  Posted (edited)

I want to change an input field in a window, so I do:

the original text is '39', I want it to '49'

ControlFocus('windowName', '' , 1005,)

ControlSend('windowName', '' , 1005, '{DEL 2} 49')

and 49 appears in the field, but when I send Enter to close the window, it resets to the original 39. Why?

btw: the program is Virtualdub, section Tuner, Standard windows system.

Edited by frank10

Share this post


Link to post
Share on other sites



I have run into this exact same problem with some internal applications my company develops. Basically anything that is written using a language called Progress, the Controls can not be modified directly. I have to set focus on the control then use the send command. I don't know what language your app is written in but the issue sounds the same.

Mike


Share this post


Link to post
Share on other sites

I solved the problem using this code:

ControlClick('windowName', '' , 1005)

ControlSend('windowName', '' , 1005, '{BS 2} 49')

Simulating the mouseclick the cursor points to the right of the text, so I make 2 Backspace and then insert the new text. ControlSend with BS WORKS.

I don't know why Focus and DEL doesn't work. ??

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