OiMunk Posted January 26, 2008 Posted January 26, 2008 I wrote a small script that increments the text in a field. This works perfectly, except that the user tends to trigger the script in quick succession, which creates a jumble of text in the field. I'm not sure how to make one script wait for another, or stop two identical scripts from running. $var = ControlGetText("REAPER v", "", "[iD:1137]") ControlFocus("REAPER v", "", "[iD:1137]") ControlSend("REAPER v", "", "[iD:1137]","{DEL}{DEL}{DEL}{DEL}{DEL}" & $var+$Inc & "{ENTER}") ;The field wouldn't accept Ctrl+A to select the existing text, so I resorted to multiple {DEL}'s to clear the field. There must be a better way. Any help appreciated, cheers,
Squirrely1 Posted January 26, 2008 Posted January 26, 2008 OiMunk - You should read in the AutoIt Help file for these two functions: ControlSetText ( "title", "text", controlID, "new text" [, flag] ) #Include <Misc.au3> _Singleton($sOccurenceName[, $iFlag = 0]) The second keeps other identical scripts from running. Das Häschen benutzt Radar
OiMunk Posted January 27, 2008 Author Posted January 27, 2008 Thanks Squirrely! It works flawlessly now, cheers OiMunk - You should read in the AutoIt Help file for these two functions: ControlSetText ( "title", "text", controlID, "new text" [, flag] ) #Include <Misc.au3> _Singleton($sOccurenceName[, $iFlag = 0]) The second keeps other identical scripts from running.
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