olo Posted May 16, 2013 Share Posted May 16, 2013 (edited) Hey folks, Im trying to send a string to a file box then click open, to open that file. So I want to send a path like "C:Usersdesktopfile.olo etc But sometimes the keyboard rushes it I presume as it can be seen sometimes as C;userdsahfaoahf.oafo or something mad like that. So the program essentially got it wrong if displays an error box once open is clicked...obviously. But would can I includ in the bottom code to: Print an error and then restart the function all over again? If (ControlSend("[TITLE:" & $ExternalTitle & "]", "", "Edit1", $file)) Then ControlClick("[TITLE:" & $ExternalTitle & "]", "&Open", "Button2", "left", 1) Sleep(500) Else ACRAOutputError("Function timed out while trying to load the file!") EndIf Edited May 16, 2013 by olo Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 16, 2013 Moderators Share Posted May 16, 2013 Have you tried AutoItSetOption("SendKeyDelay", x)? Put this at the top of your script (where x = the number of milliseconds between key presses). It may help slow things down a bit for you. olo 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
olo Posted May 16, 2013 Author Share Posted May 16, 2013 Have you tried AutoItSetOption("SendKeyDelay", x)? Put this at the top of your script (where x = the number of milliseconds between key presses). It may help slow things down a bit for you. thanks JLogan Link to comment Share on other sites More sharing options...
jdelaney Posted May 16, 2013 Share Posted May 16, 2013 (edited) what about controlsettext, get away for them limitations of sends. AutoItSetOption("SendKeyDelay", 100) AutoItSetOption("SendKeyDownDelay", 100) ControlSend("Untitled - Notepad", "", 15, "some data 1") ControlSetText("Untitled - Notepad", "", 15, "another data set") Edited May 16, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
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