DeeJay7 Posted November 29, 2014 Posted November 29, 2014 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.
JohnOne Posted November 29, 2014 Posted November 29, 2014 Firstly, try using ControlSend instead of send, to see if that solves. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Danp2 Posted November 29, 2014 Posted November 29, 2014 You could also try ControlGetText and ControlSetText instead of using copy / paste. Latest Webdriver UDF Release Webdriver Wiki FAQs
DeeJay7 Posted November 29, 2014 Author Posted November 29, 2014 You could also try ControlGetText and ControlSetText instead of using copy / paste. Thanks.
DeeJay7 Posted November 29, 2014 Author Posted November 29, 2014 You could also try ControlGetText and ControlSetText instead of using copy / paste. Thanks.
DeeJay7 Posted December 1, 2014 Author Posted December 1, 2014 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.
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