I have been researching for a way to perform perfect circles in the mouse movement by simply pressing "spacebar". I have only done moding of numbers in autohotkey scripts, never have I made a script from scratch. I have read documentation on mousemovement but am not getting any where understanding it. Any help of any kind is apreciated.
At the 1st position would be the center of the circle. Then proceed 45 degrees down and left(distance doesnt matter, but that distance shall be the radius of the circle). Then proceed with the circles in a counterclockwise pattern. Speed shall be consistent and nonstop for duration of the "spacebar" being pressed.
If someone takes this upon themselves to do a great deed for another, i would prefer to be able to see the script and be able to determine the number in the script that manages the speed, so i can tune it to my function.
Any help is greatly aprreciated. Thanks.
MouseMovement(consistent circles).
Started by
boddie
, May 06 2009 09:14 AM
15 replies to this topic
#1
-
Posted 06 May 2009 - 09:14 AM
Well the first question is, how "perfect" do the circles need to be?
#2
-
Posted 06 May 2009 - 05:09 PM
Well, thanks for just responding. I really didnt mean for the post to come off that I was only looking for someone to make it for me. I was only hoping there was a generous person that could help. Ive been looking at all the examples of mouse movement and stuff but am not getting any where.
I guess as close to perfection will have to do. Anything will help, if i get a scipt that performs the circles, i am sure i can look at the script and learn how it works. Then I can tune it up. Me starting one is the problem. This will aid in helping me with my right thumb disability. Its for a game on xbox 360 that requires me to perform the circular functions on the right stick, but with my right thumb having little flexion, the cpu is getting the better of me. I have purchased a controller that allows me to use mouse and keyborad for FPS games thru a PC with mouse replacing the right stick. Its helps me play when normally I cant. Anyways, the mouse is hard to do these circles with so thats why I am here.
So my answer to your question would be " no they dont have to be perfect circles". I have already drawn out my grid to get the pixel count but the codes are kicking my butt.
I guess as close to perfection will have to do. Anything will help, if i get a scipt that performs the circles, i am sure i can look at the script and learn how it works. Then I can tune it up. Me starting one is the problem. This will aid in helping me with my right thumb disability. Its for a game on xbox 360 that requires me to perform the circular functions on the right stick, but with my right thumb having little flexion, the cpu is getting the better of me. I have purchased a controller that allows me to use mouse and keyborad for FPS games thru a PC with mouse replacing the right stick. Its helps me play when normally I cant. Anyways, the mouse is hard to do these circles with so thats why I am here.
So my answer to your question would be " no they dont have to be perfect circles". I have already drawn out my grid to get the pixel count but the codes are kicking my butt.
#3
-
Posted 07 May 2009 - 07:48 AM
Thanks hater,
I didnt understand alot of what was going on in the thread you listed but it link to this one:
http://www.autohotke...436.html#160436
Im not sure if Im reading the code right but it looks like I can use this one right? I know it doesnt have the 45 degree starting offcenter, but simple circles will work. I will have to change the script start to spacebar but its looking promising. Ill have to study the script a little more to undestand it. I hope this works to relieve my frustrations. After all the searching, i cant believe i didnt find this.
I didnt understand alot of what was going on in the thread you listed but it link to this one:
http://www.autohotke...436.html#160436
Im not sure if Im reading the code right but it looks like I can use this one right? I know it doesnt have the 45 degree starting offcenter, but simple circles will work. I will have to change the script start to spacebar but its looking promising. Ill have to study the script a little more to undestand it. I hope this works to relieve my frustrations. After all the searching, i cant believe i didnt find this.
#5
-
Posted 07 May 2009 - 09:28 AM
I had a try with the one from engunneer (the others might work too). Simply start his script. Press F11 to define the starting position, and WheelUp/-Down to start to circle back/forth.
#6
-
Posted 07 May 2009 - 09:47 AM
Which starts to move around the circle at "6 o'clock" :!:Press F11 to define the starting position
#7
-
Posted 07 May 2009 - 09:52 AM
I dont mean to badger you with questions. I not interpreting everything in the script. Now if I change the "wheel up" to "spacebar", that will make the spacebar the executtion button right? Will it continue with the circles for how ever long the button is pressed? Also, i dont see a speed variable where i can tweak the speed. I need this incredibly fast, but preferably changable, is there a speed variable in there?
Again im sorry for all the questions, i hate coming here and asking for alot with nuthing to offer cause im new to this.. Thanks.
Again im sorry for all the questions, i hate coming here and asking for alot with nuthing to offer cause im new to this.. Thanks.
#8
-
Posted 07 May 2009 - 09:57 AM
Nevermind the speed I see it, i didnt have it exapnd all the way to the top. Thanks.
#9
-
Posted 07 May 2009 - 09:59 AM
Ok, it all just clicked. I think that will suffice for the purpose I need it for. When I get off work I will run it.
Thank you guys. You know most places you go and ask for help with nuthing to offer, nobody will help you. This place is great. thanks.
Thank you guys. You know most places you go and ask for help with nuthing to offer, nobody will help you. This place is great. thanks.
#10
-
Posted 07 May 2009 - 10:02 AM
$*Space:: ; press space, then move the mouse, then release space MouseGetPos, baseX, baseY Keywait, Space Speed = 15 ; also effects the accuracy of the circle, be careful Clockwise := true SetDefaultMouseSpeed, 0 MouseGetPos, offsetX, offsetY dx := offsetX - baseX dy := (-offsetY + baseY) * (!Clockwise*2-1) offsetR := (dx = 0) ? (0.25+(dy>0)/2) : (ATan(dy/dx)/6.2831853+(dx<0)/2+(dx>0 && dy<0)) SetBatchLines, -1 Loop, % slices := Ceil( (10/speed) * Dist := Sqrt(dx**2 + dy**2) ) MouseMove, % BaseX + Dist * Cos(6.2831853*(A_Index / slices + offsetR)) , % baseY - (!Clockwise*2-1) * Dist * Sin(6.2831853*(A_Index / slices + offsetR)) return:?:
#11
-
Posted 07 May 2009 - 10:44 AM
Ill try that script too VX when i get home. You guys are great!
#12
-
Posted 07 May 2009 - 12:11 PM
$*Space:: ; press space, then move the mouse, then release space MouseGetPos, baseX, baseY Keywait, Space Speed = 15 ; also effects the accuracy of the circle, be careful Clockwise := true SetDefaultMouseSpeed, 0 MouseGetPos, offsetX, offsetY dx := offsetX - baseX dy := (-offsetY + baseY) * (!Clockwise*2-1) offsetR := (dx = 0) ? (0.25+(dy>0)/2) : (ATan(dy/dx)/6.2831853+(dx<0)/2+(dx>0 && dy<0)) SetBatchLines, -1 Loop, % slices := Ceil( (10/speed) * Dist := Sqrt(dx**2 + dy**2) ) MouseMove, % BaseX + Dist * Cos(6.2831853*(A_Index / slices + offsetR)) , % baseY - (!Clockwise*2-1) * Dist * Sin(6.2831853*(A_Index / slices + offsetR)) return:?:
Is there anyways to change that to where I can just push "space" alone to do circles as opposed to push "space and move mouse" ?
I tried the script enguneer had in the link above but it is way to slow.
#13
-
Posted 10 May 2009 - 03:30 PM
All you'd have to do is comment out the lines that fill the variables dx, dy, and OffsetR, then manually assign values to them.
The format for those variables should be as follows:
dx := 0
dy := YourRadius
OffsetR := Starting angle (in revolutions). For instance, a 45ยบ towards the lower right would be OffsetR := 7/8
The format for those variables should be as follows:
dx := 0
dy := YourRadius
OffsetR := Starting angle (in revolutions). For instance, a 45ยบ towards the lower right would be OffsetR := 7/8
#14
-
Posted 10 May 2009 - 08:49 PM
Ok, circles are great, but when I run the exe that i need to run it on, it doesnt work. Its a locked on top exe, so maybe thats why its accepting the input.
#15
-
Posted 10 May 2009 - 11:39 PM