circle move mouse cursor repeatedly

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
bibi
Posts: 2
Joined: 25 Apr 2018, 04:16

circle move mouse cursor repeatedly

25 Apr 2018, 04:53

hi everyone

I'd like some help to make a script, this is what I want to do : mouse move in a circle from my mouse cursor position with a 50 radius, while the mouse move in circle I want RButton (rightclick) to be repeatedly clicked (with the lowest possible delay between each click). When I press MButton (toggle on/off), the mouse move in a circle then the script turn off when I press MButton again. Moreover I want to control the speed of the circle uhh.

I've found this topic but it's not exactly what I'm looking for :
https://autohotkey.com/boards/viewtopic.php?t=10154

help much appreciated !
Odlanir
Posts: 659
Joined: 20 Oct 2016, 08:20

Re: circle move mouse cursor repeatedly

25 Apr 2018, 05:31

Some like this?

Code: Select all

CoordMode, Mouse, Screen
steps  := 12
radius := 50
toggle := false
MButton::
	toggle := !toggle
	if (toggle) {
		MouseGetPos, x,y
		MoveMouse_Circle(x, y, radius, steps) 
	}
return
^WheelUp::  ; increase step amount
	steps += 1
	ToolTip % steps
return
^WheelDown:: ; decrease step amount
	steps -= 1
	ToolTip % steps
return

MoveMouse_Circle(cx, cy, r, s) { ; move mouse in a circle by wolf_II
    $Pi := 4 * ATan(1)
    MouseMove, cx + r, cy, 0
    Loop, % s { ; number of steps
        MouseMove, cx + r * Cos(A_Index * 2 * $Pi / s)
                 , cy + r * Sin(A_Index * 2 * $Pi / s)		
		click right
	}
				 
}
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
bibi
Posts: 2
Joined: 25 Apr 2018, 04:16

Re: circle move mouse cursor repeatedly

25 Apr 2018, 07:02

hmm nothing happens, looks like the toggle doesn't work or something else idk

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 248 guests