Jump to content

Recommended Posts

Posted

my script like this: 

send(......)
send(............................)
send(.........)
 

But my CPU is Intel Celeron 2Ghz, DDR RAM 512Mb, so when i use some send a long character string, it runs incorrectly

So, is there anyway to use sleep(time) to make script stop until the send complete, then run the next send code (i dont want use time is number to avoid waste time)

Posted

This may or may not work on your version.

I'm unable to get the buttons.  Probably need UI automation for that, but most is done:

; initate the find-replace window...then execute this script
$hFindReplace = WinWait("Find and Replace")
WinActivate($hFindReplace)
$hFind = ControlGetHandle($hFindReplace,"",1024)
$hReplace = ControlGetHandle($hFindReplace,"",1026)

ControlSetText($hFindReplace, "", $hFind, "searchstring")
ControlSetText($hFindReplace, "", $hReplace, "replacestring")

ControlSend($hFindReplace, "", "","!a")

WinWaitClose($hFindReplace)

ConsoleWrite("done" & @CRLF)
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.
Posted

i think you was looking for this

Opt('SendAttachMode', 1)            ; 0 = Don't attach, 1 = Attach.
Opt('SendCapslockMode', 0)      ; 1 = Store and restore, 0 = Don't store/restore.
Opt('SendKeyDelay', 5)          ; ? = 5 milliseconds.
Opt('SendKeyDownDelay', 1)      ; ? = 1 millisecond.

if you are still not satisfied then make a udf like this

Func _Send($character,$sleep)
Send($character)
Sleep($sleep)
EndFunc

and send your string character by character using a loop :):D:P

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
  • Recently Browsing   0 members

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