Jump to content
Sign in to follow this  
olo

String sent...right/wrong?

Recommended Posts

olo

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

Share this post


Link to post
Share on other sites
JLogan3o13

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.

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
olo

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

Share this post


Link to post
Share on other sites
jdelaney

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.

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  

×