 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
sinatropus Guest
|
Posted: Wed Mar 26, 2008 1:28 am Post subject: |
|
|
| The Iron Savior wrote: |
About returning the cursor to its original location. THIS script as it is presented here (v1.1) does not move the mouse back. I did have a version before posting that would try to keep the mouse in the same spot all the time and it worked well and it was even a feature that you could turn off and on. In the end, it didn't really add anything valuable and I didn't like the way it made my code look, so I just scrapped the whole idea. |
Personally I consider it very valuable because scroll wheel turn in most CAD, image editing etc programs works as zoom (not as scroll) and it is cursor orientated so it will zoom in to the point under the cursor (not to the center of the window). At the moment cursor position is not constant and therefore zoom target position is moving away from the initial zoom focus point and we end up in a wrong location.
I experimented with BlockInput MouseMove but with no effort because I don't know if it is possible to read the mouse movement without moving the cursor itself? I have very little experience with autohotkey and in programming whatsoever so even this topic is over my head. Any help would be much appreciated. Thanks. |
|
| Back to top |
|
 |
gioni Guest
|
Posted: Wed Apr 09, 2008 9:42 am Post subject: need help |
|
|
hey guys,
i need to know if it possible for a script to do the following:
scroll with the ball from my marble mouse, while the other mouse ( a normal usb one) remains "unaffected".
Thank you verry much. |
|
| Back to top |
|
 |
BbErSerkK Guest
|
Posted: Wed Apr 30, 2008 1:32 am Post subject: |
|
|
This is the script i use to emulate mouse wheel scrolling with my 3m ergonomic mouse (no scroll wheel)
I've played with it recently and now it has some little glitches, so any feedback welcome.
I would also like to combbine it with "katmouse"/"hotmouse" functionality (e.g. scroll the window under the mouse cursor without losing focus)
But don't have the brains to do it
If anyone could give tips that would be great:
the code for the hotmouse stuff is here but i can't seem to get it to combine: http://www.autohotkey.com/forum/topic6772.html
| Code: | MouseWheelSpeed = 1
MouseWheelAccelerationSpeed = 8
MouseWheelMaxSpeed = 15
MouseRotationAngle = 0
Hotkey, MButton & LButton, ButtonWheelDown
Hotkey, MButton & RButton, ButtonWheelUp
ButtonWheelUp:
ButtonWheelDown:
If Button <> 0
{
If Button <> %A_ThisHotkey%
{
MouseWheelCurrentAccelerationSpeed = 0
MouseWheelCurrentSpeed = %MouseWheelSpeed%
}
}
StringReplace, Button, A_ThisHotkey, *
ButtonWheelAccelerationStart:
If MouseWheelAccelerationSpeed >= 1
{
If MouseWheelMaxSpeed > %MouseWheelCurrentSpeed%
{
Temp = 0.001
Temp *= %MouseWheelAccelerationSpeed%
MouseWheelCurrentAccelerationSpeed += %Temp%
MouseWheelCurrentSpeed += %MouseWheelCurrentAccelerationSpeed%
}
}
;MsgBox %Button%
If Button = MButton & RButton
MouseClick, wheelup, , , ,%MouseWheelCurrentSpeed%, D
else if Button = MButton & LButton
MouseClick, wheeldown, , , ,%MouseWheelCurrentSpeed%, D
SetTimer, ButtonWheelAccelerationEnd, 100
return
ButtonWheelAccelerationEnd:
GetKeyState, kstate, LButton, P
if kstate = D
Goto ButtonWheelAccelerationStart
GetKeyState, kstate, RButton, P
if kstate = D
Goto ButtonWheelAccelerationStart
MouseWheelCurrentAccelerationSpeed = 0
MouseWheelCurrentSpeed = %MouseWheelSpeed%
Button = 0
return |
[/code] |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|