Sign in to follow this  
Followers 0
jdelaney

Slow down execution

8 posts in this topic

#1 ·  Posted (edited)

This post is going outside of the norm of speeding up a script.

Is there anything that can be done, to say, set a 10millisecond (or any configurable wait) between commands?

I'd like an answer where no script changes would be needed.  Something like how selenium has the slider to slow down script runs.

I've seen there are some AutoItSetOption options, but they are on things I don't use, like sends and mouse clicks.

I want my script to be more 'human' like (conditionally).  This change is not to stop a script from acting too quickly to do what it's supposed to, but to stall the firing of actions.

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



#3 ·  Posted (edited)

Sleep(1000) ; sleeps for 1 second

RunWait() ; waits for an external exe process to end

Processwait() waits for the process to end

IE_Wait() waits for an IE page to complete

.... all require some edits to the script

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

What are those things called that always run in parralel with scripts...there's gotta be something there that can be done.  Maybe checking the script line, and if greater than the last, sleep for some amount of time.  Just not familiar with them.

Valuater, my scripts already do what is necessary to complete.  This is just to make things like screen recording look human like, rather than blurring though actions.

edit: adlibregister!...might to the trick

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

#6 ·  Posted (edited)

AdlibRegister ( "DelayActions",50 )

Func DelayActions()
 Sleep(20)
EndFunc

that's a small addition that does not require script changes (adding hard coded sleeps every few lines)

Edited by jdelaney
1 person likes this

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

When I was automating game interaction on a very popular fantasy MMO, that's about the only time I had use for random waits between script functions....I hard-coded 200 to 500ms waits to give it a more "human" look to it.

$iWait = Random(200, 500,1)
Sleep($iWait)

 

But like I said ... the only use I could see would be to fool a game warden or something like that.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Yeah, blue, that makes a lot of sense since i'm not sending key presses or mouse clicks...or else the AutoItSetOptions route would work, and i would not need to have post this question

Your suggestion does not help, since I stated I do not want to have to manipulate the script by adding hard coded sleeps.  Anyways, my solution was found via adlibregister, so feel free to post better solutions.

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