Jump to content
Sign in to follow this  
MaeX

Mouse Code

Recommended Posts

Hi im a noob :-) but i have tested a code.

Need the code to Send Mouse2 to the actuall program.

For example Send("Pause") to Send Pause ... but what i have to do to send Mouse2 ?

Thx for help :-)

Edited by MaeX

Share this post


Link to post
Share on other sites

Thx, but how i have to integrate in this script ?

Thx for Help!!

HotKeySet("{PAUSE}", "Start")

HotKeySet("!{PAUSE}","Quit")

TogglePause()

func Start()

HotKeySet("{PAUSE}")

HotKeySet("{PAUSE}", "TogglePause")

ToolTip('Test started.',0,0)

While 1

Send("MouseClick("Right"))

Sleep(Random(120000,240000))

WEnd

EndFunc

Func TogglePause()

ToolTip('Test Stopped.',0,0)

HotKeySet("{PAUSE}")

HotKeySet("{PAUSE}", "Start")

While 1

sleep(100)

WEnd

EndFunc

func Quit()

Exit

EndFunc

Share this post


Link to post
Share on other sites

Don't use Send.

MouseClick

--------------------------------------------------------------------------------

Perform a mouse click operation.

MouseClick ( "button" [, x, y [, clicks [, speed ]]] )

Parameters

button The button to click: "left", "right", "middle", "main", "menu", "primary", "secondary".

x, y [optional] The x/y coordinates to move the mouse to. If no x and y coords are given, the current position is used (default).

clicks [optional] The number of times to click the mouse. Default is 1.

speed [optional] the speed to move the mouse in the range 1 (fastest) to 100 (slowest). A speed of 0 will move the mouse instantly. Default speed is 10.

Share this post


Link to post
Share on other sites

Like this ^^

HotKeySet("{PAUSE}", "Start")

HotKeySet("!{PAUSE}","Quit")

TogglePause()

func Start()

HotKeySet("{PAUSE}")

HotKeySet("{PAUSE}", "TogglePause")

ToolTip('Test started.',0,0)

While 1

MouseClick("Right")

Sleep(Random(120000,240000))

WEnd

EndFunc

Func TogglePause()

ToolTip('Test Stopped.',0,0)

HotKeySet("{PAUSE}")

HotKeySet("{PAUSE}", "Start")

While 1

sleep(100)

WEnd

EndFunc

func Quit()

Exit

EndFunc

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  

×
×
  • Create New...