Jump to content

Recommended Posts

Posted

Hello guys :whistle:

All i want to say for the first is that... AutoIt rox :dance:) Now question :dance:

When i make :

<CUT>

MouseDown("left")

WinActivate("blabla", "")

MouseUp("left")

<CUT>

My script makes MouseDown function for too long time... Does somebody know how to decrase time between MouseDown and MouseUp?

Thanks a lot :(

Posted

Add Opt("WinWaitDelay", 1) to the top of your script.

from the help file:

Alters how long a script should briefly pause after a successful window-related operation.

Time in milliseconds to pause (default=250).

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

@Josbe,

None of the mouse related OPT settings apply to the three lines of code in the original post (but it does not hurt to point them out). There is no click, so not even MouseClickDownDelay impacts the script as shown. One would think that one mouse down and one mouse up = one mouse click, but try this code:

AutoItSetOption("MouseClickDelay", 2000)
AutoItSetOption("MouseClickDownDelay", 2000)
AutoItSetOption("MouseClickDragDelay", 2000)

AutoItSetOption("WinWaitDelay", 250) ;(milliseconds)
$start1 = TimerInit()
MouseDown("left")
WinActivate("")
MouseUp("left")
$stop1 = TimerDiff($start1)
MsgBox(0, "", "$stop1 = " & $stop1)

AutoItSetOption("WinWaitDelay", 1) ;(milliseconds)
$start2 = TimerInit()
MouseDown("left")
WinActivate("")
MouseUp("left")
$stop2 = TimerDiff($start2)
MsgBox(0, "", "$stop1 = " & $stop2)
...and lets not revist why a delay settings of 1 millisecond does not cause a 1 millisecond delay :-)

http://www.autoitscript.com/forum/index.ph...indpost&p=90959

later

[size="1"][font="Arial"].[u].[/u][/font][/size]

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
×
×
  • Create New...