I turned off all my other scripts and apps to eliminate interference with them. I am using a laptop with a touchpad, which is my pointing device, and the pointer has never acted erratically.boiler wrote: ↑26 Mar 2023, 07:44If not the above scenario, do you have any other scripts or applications running that have anything to do with positioning the mouse? Are you using a laptop with a touch screen or touchpad? Does your mouse pointer ever move to another location of the screen at other times instead of slowly moving in a path to a new location? What is your mouse pointing device?
Script that moves my cursor in a circle
Re: Script that moves my cursor in a circle
Re: Script that moves my cursor in a circle
It’s not that it would be acting erratically. If you are touching the touchpad at all while it’s running, you would be moving the mouse from where it’s moving in circles.
You didn’t answer the questions about what you are doing while it’s running. After you start the script, are you just hitting the hotkey to un-pause it and holding down the left mouse button so it draws in MS Paint? Are you pausing and un-pausing the script? Since you must be holding the left mouse button down, is your hand possibly occasionally touching the touchpad?
You didn’t answer the questions about what you are doing while it’s running. After you start the script, are you just hitting the hotkey to un-pause it and holding down the left mouse button so it draws in MS Paint? Are you pausing and un-pausing the script? Since you must be holding the left mouse button down, is your hand possibly occasionally touching the touchpad?
Re: Script that moves my cursor in a circle
What I was doing after I start the script is, in MS paint, to un-pause and hold the left trackpad button down. I'm sure that I wasn't touching the touchpad. I used these hotkeys to help check for interference:
Code: Select all
1::DllCall("mouse_event", "UInt", 0x02) ; left mouse button down
2::DllCall("mouse_event", "UInt", 0x04) ; left mouse button up
Re: Script that moves my cursor in a circle
Well, I can’t see how what is happening is a result of the function itself. To try to isolate it, just run your script without trying to draw anything in Paint. Just press the hotkey to unpause it and watch the mouse pointer move without touching your computer at all.
Re: Script that moves my cursor in a circle
It still moves to another area on the canvas to move in the circle. I was thinking testing in Virtualbox by making a Windows 10 virtual machine.
Re: Script that moves my cursor in a circle
u wrote these dllcalls wrong, so any garbage thats left in memory nearby, gets passed as arguments to the functionLAPIII wrote: ↑26 Mar 2023, 10:22Code: Select all
1::DllCall("mouse_event", "UInt", 0x02) ; left mouse button down 2::DllCall("mouse_event", "UInt", 0x04) ; left mouse button up
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-mouse_event
Re: Script that moves my cursor in a circle
To active click CTRL + 5 script is there:
[Mod edit: [code][/code] tags added. Please use them yourself going forward.]
Code: Select all
;Input my radius
InputBox, Radius, Radius, Input Radius
;Draw my circle
^5::
MouseGetPos, StartX, StartY
MouseMove, 0, %Radius%, 0, R
MouseClick, Left, , , , 0, D
Loop 64
{
xVar := Radius*Sin(A_Index/10)
yVar := Radius*Cos(A_Index/10)
DrawX := StartX+xVar
DrawY := StartY+yVar
MouseMove, %DrawX%, %DrawY%,
}
MouseClick, Left, , , , 0, U
Return
^`::Pause
^2::Reload