Skip to main content

Simulate-Wheel

Command Description

Simulate mouse scrolling

Command Prototype

Mouse.Wheel(iCount,iDirection, sKeyModifiers,optionArgs)

Parameter Description

ParameterRequiredTypeDefaultDescription
iCountTruenumber0Count of scroll times
iDirectionTrueenum"down"Direction of wheel scrolls
sKeyModifiersTrueset[]Keyboard keys used while a mouse action is triggered: Alt, Ctrl, Shift, Win
iDelayAfterNonenumber300Delay time (in milliseconds) after executing the activity is 300 milliseconds
iDelayBeforeNonenumber200The delay time (in milliseconds) before any operations are executed is by default 200 milliseconds

Demo

TracePrint "--------------------Analog Wheel--------------------" 
// --------------------------------------------------------
// [Remarks] Simulate wheel
// Input parameter 1:
// iCount--Scroll times
// Input parameter 2:
// iDirection--scroll direction (scroll down/scroll up)
// Input parameter 3:
// sKeyModifiers--Auxiliary keys
// Input parameter 4:
// optionArgs--Optional parameters (including: delay after execution/delay before execution).Type:Dict

// Command prototype: Mouse.Wheel(iCount,iDirection, sKeyModifiers,optionArgs)
// --------------------------------------------------------

Mouse.Wheel(2,"down", [],{"iDelayAfter":300, "iDelayBefore":200})