Sign in to follow this  
Followers 0
DeeJay7

Accurate Controlclick in loop script

6 posts in this topic

I'm creating a script that enters texts in multiple edit boxes with Controlclick function. This script has loop of multiple records (saves every record and goes to next record).

The problem is the script runs for first few records of the loop and then stucks somewhere (tries to send clicks to wrong controls).

I guess the controlclick is not accurate or keydelay is too short. I've tried opt with increased key delay, still no success.

Examples of my script with controlclick:

ControlClick($myapptitle, "", "Edit39") ; my edit box name
Sleep(1000)
TrayTip ( "JD Dev", "my msg", 1) ; for my dev purpose
Send("{CTRLDOWN}a{CTRLUP}{CTRLDOWN}c{CTRLUP}{TAB}") ; copies value from here
Sleep(1000)
WinActivate("[CLASS:SWT_Window0]", "")
ControlClick($myapptitle, "", "Edit40") ; need to paste here
Sleep(1000)
TrayTip ( "JD Resolve1 Dev", "Downtime end", 1) ; my traytip for dev purpose
Send("{CTRLDOWN}v{CTRLUP}{TAB}") ; paste the copied data above
----
Most of the time, above step is not executed and clicks in wrong windows.
---
Thanks in advance for your time and response.

Share this post


Link to post
Share on other sites



You could also try ControlGetText and ControlSetText instead of using copy / paste.

Share this post


Link to post
Share on other sites

You could also try ControlGetText and ControlSetText instead of using copy / paste.

Thanks.

Share this post


Link to post
Share on other sites

You could also try ControlGetText and ControlSetText instead of using copy / paste.

Thanks.

Share this post


Link to post
Share on other sites

Thanks JohnOne and Danp2, your tips helped to resolve this issue.

Now I'm looking ways to solve the control value keep changing randomly, and hope simplespy will help.

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