Jump to content

String sent...right/wrong?


Recommended Posts

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 by olo
Link to comment
Share on other sites

  • Moderators

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.

"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

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

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 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...