 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Fry
Joined: 01 Nov 2007 Posts: 689
|
Posted: Sun Nov 11, 2007 3:35 pm Post subject: Mouse Remap ! No Need For Mouse! (Update # 2) |
|
|
Pressing Capslocks with enable/disable the remapping
of the mouse
This script will remap the arrow keys to move the mouse .
Insert,Home,Delete,Page Down,and End keys to be the mouse buttons.
Credits To ahklerner for help with mouse move
Please read the help file below
Update
2007-11-11
There Is Now a GUI remapper
Update 2007-11-24
Better Performance
Caplocks Toggles On /Off
| Code: |
When Pressing The Middle Mouse Remap Button
Click It One Then User UP and DOWN Arrow
Keys
The Arrow Keys Control The Mouse
Up = Mouse Move Up
Down = Mouse Move Down
Left = Mouse Move Left
Right = Mouse Move Right
Home = MouseWheel Up
End = MouseWheel Down
Delete = Left Mouse Button
Page = Down Right Mouse Button
Insert = Middle Mouse Button |
And For The Mouse Remap Script!
| Code: | /*
When Pressing The Middle Mouse Remap Button
Click It One Then User UP and DOWN Arrow
Keys
The Arrow Keys Control The Mouse
Up = Mouse Move Up
Down = Mouse Move Down
Left = Mouse Move Left
Right = Mouse Move Right
Home MouseWheel Up
End MouseWheel Down
Delete Left Mouse Button
Page Down Right Mouse Button
Insert Middle Mouse Button
*/
SetBatchLines -1
#UseHook
Increment = 1
MouseDelay = 0
Left::
Right::
Up::
Down::
xVal=
yVal=
If GetKeyState("CapsLock","T")
{
IncrementValue := Increment
Loop,
{
If (A_Index > IncrementValue * 15) and (IncrementValue < Increment * 5)
IncrementValue := IncrementValue * 2
If GetKeyState("Down", "P")
yVal := IncrementValue
Else If GetKeyState("Up", "P")
yVal := -IncrementValue
If !yVal
yVal := 0
If GetKeyState("Left", "P")
xVal := -IncrementValue
Else If GetKeyState("Right", "P")
xVal := IncrementValue
If !xVal
xVal := 0
If GetKeyState(A_ThisHotKey, "P")
MouseMove, %xVal%, %yVal%,%MouseDelay%,R
Else
Break
}
}
Else
Send % "{" . A_ThisHotKey . "}"
return
Esc::ExitApp
Home:: Send {WheelUp}
End:: Send {WheelDown}
Delete:: Send {LButton}
PgDn:: Send {RButton}
Insert:: Send {MButton}
|
The new GUI Remapper
| Code: | #SingleInstance Force
SetBatchLines -1
Menu, Menu, Add, Help, HelpFile
Menu, Menu, Add, Close, GuiClose
Gui, Menu ,Menu
Menu, Tray, NoStandard
Menu, Tray, Add, Remap Mouse, Remap
Menu, Tray, Add, Exit, GuiClose
Gui, Add, Button, x6 y10 w80 h30 gRemap, Remap Mouse
Gui, Show, x131 y91 h122 w280, Mouse Remapper
return
GuiClose:
ExitApp
HelpFile:
HText =
(
When Pressing The Middle Mouse Remap Button
Click It One Then User UP and DOWN Arrow
Keys
The Arrow Keys Control The Mouse
Up = Mouse Move Up
Down = Mouse Move Down
Left = Mouse Move Left
Right = Mouse Move Right
Home MouseWheel Up
End MouseWheel Down
Delete Left Mouse Button
Page Down Right Mouse Button
Insert Middle Mouse Button
)
msgbox, Help File,, %HText%
Remap:
SetBatchLines -1
#UseHook
Increment = 1
MouseDelay = 0
Left::
Right::
Up::
Down::
xVal=
yVal=
If GetKeyState("CapsLock","T")
{
IncrementValue := Increment ; Set the Increment value (we change it)
Loop,
{
If (A_Index > IncrementValue * 15) and (IncrementValue < Increment * 5)
IncrementValue := IncrementValue * 2
If GetKeyState("Down", "P")
yVal := IncrementValue
Else If GetKeyState("Up", "P")
yVal := -IncrementValue
If !yVal
yVal := 0
If GetKeyState("Left", "P")
xVal := -IncrementValue
Else If GetKeyState("Right", "P")
xVal := IncrementValue
If !xVal
xVal := 0
If GetKeyState(A_ThisHotKey, "P")
MouseMove, %xVal%, %yVal%,%MouseDelay%,R
Else ; we're not pressing the key...break the loop
Break
}
}
Else
Send % "{" . A_ThisHotKey . "}"
return
Esc::ExitApp
Home:: Send {WheelUp}
End:: Send {WheelDown}
Delete:: Send {LButton}
PgDn:: Send {RButton}
Insert:: Send {MButton}
return
|
Last edited by Fry on Sat Nov 24, 2007 10:36 pm; edited 4 times in total |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1249 Location: USA
|
Posted: Sun Nov 11, 2007 4:09 pm Post subject: Re: Mouse Remap ! No Need For Mouse! |
|
|
| Fry wrote: | | Credits To Enguneer for help with mouse move |
 _________________
ʞɔпɟ əɥʇ ʇɐɥʍ |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 689
|
Posted: Sun Nov 11, 2007 4:37 pm Post subject: |
|
|
so sorry
ill edit the post
i get yuo two confused for some reason  |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 689
|
Posted: Fri Nov 23, 2007 3:03 pm Post subject: |
|
|
has anybody used this yet ? _________________ check out my site
www.eliteknifesquad.com |
|
| Back to top |
|
 |
Andreone
Joined: 20 Jul 2007 Posts: 257 Location: Paris, France
|
Posted: Fri Nov 23, 2007 4:21 pm Post subject: |
|
|
Yes, just a minute ago
It works fine and I think I will keep it (well, integrate it in my big permanent script ) |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 689
|
Posted: Fri Nov 23, 2007 4:24 pm Post subject: |
|
|
just please give credits to me if you use it in a script your going to release _________________ check out my site
www.eliteknifesquad.com |
|
| Back to top |
|
 |
Bigrob55
Joined: 24 Sep 2007 Posts: 37
|
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 689
|
Posted: Sat Nov 24, 2007 2:43 pm Post subject: |
|
|
actually you already can go diagonal
Left Arrow Key = Going Left Diagonally
Right arror key = going right diagonally _________________ check out my site
www.eliteknifesquad.com |
|
| Back to top |
|
 |
Andreone
Joined: 20 Jul 2007 Posts: 257 Location: Paris, France
|
Posted: Sat Nov 24, 2007 9:32 pm Post subject: |
|
|
| Fry wrote: | | actually you already can go diagonal | I'm afraid you can't ...
But with ahklerner's example here you can  |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 689
|
|
| Back to top |
|
 |
Andreone
Joined: 20 Jul 2007 Posts: 257 Location: Paris, France
|
Posted: Sat Nov 24, 2007 10:49 pm Post subject: |
|
|
Please check out what diagonal means  |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 689
|
Posted: Sat Nov 24, 2007 10:50 pm Post subject: |
|
|
i updated the code _________________ check out my site
www.eliteknifesquad.com |
|
| 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
|