Sign in to follow this  
Followers 0
uri

How can I slow down the script playback speed?

10 posts in this topic

How can I slow down the palyback speed of a script so people can actually see the sequence on the screen.

I used screen capture SW that generated a movie of the sequence, but if I can slow down AutoIt I can

have a solution that is both functional and can be used for demonstration.

I am looking for a global solution and not adding sleep() command after each line :-)

Thanks for your help

Uri

Share this post


Link to post
Share on other sites



If you are using a function to update your pics, then maybe one sleep command in that function could be enough.


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

If you are using a function to update your pics, then maybe one sleep command in that function could be enough.

I was probably misunderstood. I used the screen capture SW before using AutoIt. Now I want to avoid using

the screen capture SW and use ONLY AutoIt. I wrote a script that run a scenario of an application and I want

to show it to other people in a speed that they can follow, and when the script ends they can continue using

the application from that point.

Uri

Share this post


Link to post
Share on other sites

Sorry, and what should Autoit do for you? Run slower? What about using CamStudio and creating a little movie about how your script performs?


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

I am looking at a SW verification/development environment where the verification team can send bug reports to the development team using AutoIt scrpits. If the playback speed can be controlled, than the script can replace a movie and also be functional, whereas the movie is not functional (so it doesn't really reproduce the bug)

This is not an unusual feature for macro recorders, most ones that I looked at have this feature like WorkspaceMacro or WinAutomation and also WindowTester

It is fairly simple to write a script that will add sleep(1000) after each functional line, but I think it should be a parameter defined with an Opt() command.

Share this post


Link to post
Share on other sites

Just as an example, WindowTester has three playback parameters:

- Delay between keystrokes

- Delay after widget clicks (this is like control click in AutoIt)

- Delay between mouse move increments

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Ah I see, I guess there is no option to get what you want, but maybe this is another (not very nice) but a way to get a bit close to it.

AdlibRegister('_slowDown', 1000)

While 1
    Sleep(100)
WEnd

Func _yourscript()
    For $i = 0 To 5
        ConsoleWrite($i & ' ' & @SEC & ':' & @MSEC & @CRLF)
    Next
EndFunc ;==>_yourscript

Func _slowDown()
    _yourscript()
EndFunc ;==>_slowDown

Mega

P.S.: This only works for the whole script and not single commands with additional sleeps.

Edited by Xenobiologist

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Just as an example, WindowTester has three playback parameters:

- Delay between keystrokes

- Delay after widget clicks (this is like control click in AutoIt)

- Delay between mouse move increments

You have

MouseClickDelay Alters the length of the brief pause in between mouse clicks.

Time in milliseconds to pause (default=10). MouseClickDownDelay Alters the length a click is held down before release.

Time in milliseconds to pause (default=10). MouseClickDragDelay Alters the length of the brief pause at the start and end of a mouse drag operation.

Time in milliseconds to pause (default=250).

SendKeyDelay <a name="SendKeyDelay">Alters the the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely.

Time in milliseconds to pause (default=5). SendKeyDownDelay Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses (and many games) you may need to raise this value from the default. A value of 0 removes the delay completely.

Time in milliseconds to pause (default=5).


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Thanks for your answer,

I saw the MouseClikDelay and the SendKeyDelay,

What is missing is also a "ControlClickDelay" which will be a default delay

after a ControlClick.

Share this post


Link to post
Share on other sites

You could write your own function, call it ControlClickDelay with all the parameters for ControlClick with one more for the delay time, then call a ControlClick(params) with a sleep after.

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