Post by Rohwedder » 17 Apr 2018, 09:15
Hallo,
1. bis 4. sollten jetzt funktionieren (so wie definiert)
Code: Select all
#SingleInstance, Force
#Persistent
#NoEnv
#InstallKeybdHook
CoordMode, Mouse ,Screen
#NoEnv
Do_ToolTip:=1
mWait:=200
gosub Mouse_Check
return ; end auto execute
Mouse_Check:
mStill:=0
MouseGetPos, Ox, Oy
Sleep %mWait%
loop {
MouseGetPos, Mx, My
if( Mx = Ox && My = Oy ) {
mStill++
if( mStill >= 5 ) { ; 5 = 1000/mWait
mStill:=0
if( !IS_MSTOPPED && Do_ToolTip )
ToolTip, Mouse has stopped moving.
IS_MSTOPPED:=1
SetTimer, MOUSE_STOPPED, -1
}
} else {
IS_MSTOPPED:=0
ToolTip
}
Ox:=Mx, Oy:=My
Sleep %mWait%
}
return
MOUSE_STOPPED:
If GetKeyState("Alt","P")
{
If GetKeyState("Str","P")
Return
Else
Click, Right
}
Else If !GetKeyState(A_PriorKey,"P") ;keine Taste ist gedrückt
Click
Return
!Esc:: ; Alt + Esc to quit
ExitApp
^q:: ;Strg + q zum ein/aus
Suspend
Pause,,1
Return
aber ich bezweifle, daß du damit glücklich wirst.
Meine Lösung war, lernen die Maus auch links zu betätigen (ohne die Linkshändereinstellung zu aktivieren!).
Jetzt kann ich jederzeit zur gesünderen Hand wechseln, auch an fremden Rechnern.
Ich habe den fürchterlichen Dauerloop zum Timer gemacht aber das Ergebnis wird nicht viel besser.
Code: Select all
#SingleInstance, Force
#Persistent
#NoEnv
#InstallKeybdHook
;CoordMode, Mouse ,Screen
#NoEnv
Do_ToolTip:=1
Mbewegt := False
diff = 10 ;Koordinatendifferenz im Quadrat
MouseGetPos, Ox, Oy
SetTimer, Mouse_Check, 200
return ; end auto execute
Mouse_Check:
MouseGetPos, Mx, My
If ((Mx - Ox)*(Mx - Ox)+(My - Oy)*(My - Oy) > diff)
SetTimer, MOUSE_STOPPED, -1000
Ox:=Mx, Oy:=My
Return
MOUSE_STOPPED:
if Do_ToolTip
{
ToolTip, Mouse has stopped moving.
SetTimer, ToolTip_Stopp, -500
}
If GetKeyState("Alt","P")
{
If GetKeyState("Str","P")
Return
Click, Right
}
Else If !GetKeyState(A_PriorKey,"P") ;keine Taste ist gedrückt) Click
Click
Return
ToolTip_Stopp:
ToolTip
Return
!Esc:: ; Alt + Esc to quit
ExitApp
^q:: ;Strg + q zum ein/aus
Suspend
Pause,,1
Return
Hallo,
1. bis 4. sollten jetzt funktionieren (so wie definiert)[code]#SingleInstance, Force
#Persistent
#NoEnv
#InstallKeybdHook
CoordMode, Mouse ,Screen
#NoEnv
Do_ToolTip:=1
mWait:=200
gosub Mouse_Check
return ; end auto execute
Mouse_Check:
mStill:=0
MouseGetPos, Ox, Oy
Sleep %mWait%
loop {
MouseGetPos, Mx, My
if( Mx = Ox && My = Oy ) {
mStill++
if( mStill >= 5 ) { ; 5 = 1000/mWait
mStill:=0
if( !IS_MSTOPPED && Do_ToolTip )
ToolTip, Mouse has stopped moving.
IS_MSTOPPED:=1
SetTimer, MOUSE_STOPPED, -1
}
} else {
IS_MSTOPPED:=0
ToolTip
}
Ox:=Mx, Oy:=My
Sleep %mWait%
}
return
MOUSE_STOPPED:
If GetKeyState("Alt","P")
{
If GetKeyState("Str","P")
Return
Else
Click, Right
}
Else If !GetKeyState(A_PriorKey,"P") ;keine Taste ist gedrückt
Click
Return
!Esc:: ; Alt + Esc to quit
ExitApp
^q:: ;Strg + q zum ein/aus
Suspend
Pause,,1
Return[/code]
aber ich bezweifle, daß du damit glücklich wirst.
Meine Lösung war, lernen die Maus auch links zu betätigen (ohne die Linkshändereinstellung zu aktivieren!).
Jetzt kann ich jederzeit zur gesünderen Hand wechseln, auch an fremden Rechnern.
Ich habe den fürchterlichen Dauerloop zum Timer gemacht aber das Ergebnis wird nicht viel besser.[code]#SingleInstance, Force
#Persistent
#NoEnv
#InstallKeybdHook
;CoordMode, Mouse ,Screen
#NoEnv
Do_ToolTip:=1
Mbewegt := False
diff = 10 ;Koordinatendifferenz im Quadrat
MouseGetPos, Ox, Oy
SetTimer, Mouse_Check, 200
return ; end auto execute
Mouse_Check:
MouseGetPos, Mx, My
If ((Mx - Ox)*(Mx - Ox)+(My - Oy)*(My - Oy) > diff)
SetTimer, MOUSE_STOPPED, -1000
Ox:=Mx, Oy:=My
Return
MOUSE_STOPPED:
if Do_ToolTip
{
ToolTip, Mouse has stopped moving.
SetTimer, ToolTip_Stopp, -500
}
If GetKeyState("Alt","P")
{
If GetKeyState("Str","P")
Return
Click, Right
}
Else If !GetKeyState(A_PriorKey,"P") ;keine Taste ist gedrückt) Click
Click
Return
ToolTip_Stopp:
ToolTip
Return
!Esc:: ; Alt + Esc to quit
ExitApp
^q:: ;Strg + q zum ein/aus
Suspend
Pause,,1
Return[/code]