#include <Misc.au3>
AutoItSetOption("WinTitleMatchMode", 4)
$dll = DllOpen("user32.dll")
$ini = "functions.ini"
$func1 = IniRead($ini,"HotKey","Function1",@WindowsDir&"\system32\calc.exe")
$func2 = IniRead($ini,"HotKey","Function2",@WindowsDir&"\system32\calc.exe")
$func3 = IniRead($ini,"HotKey","Function3",@WindowsDir&"\system32\calc.exe")
$func4 = IniRead($ini,"HotKey","Function4",@WindowsDir&"\system32\calc.exe")
$func5 = IniRead($ini,"Gestures","Function5",@WindowsDir&"\system32\calc.exe")
$func6 = IniRead($ini,"Gestures","Function6",@WindowsDir&"\system32\calc.exe")
$func7 = IniRead($ini,"Gestures","Function7",@WindowsDir&"\system32\calc.exe")
$func8 = IniRead($ini,"Gestures","Function8",@WindowsDir&"\system32\calc.exe")
$funcl1 = IniRead($ini,"Label","Function1",@WindowsDir&"\system32\calc.exe")
$funcl2 = IniRead($ini,"Label","Function2",@WindowsDir&"\system32\calc.exe")
$funcl3 = IniRead($ini,"Label","Function3",@WindowsDir&"\system32\calc.exe")
$funcl4 = IniRead($ini,"Label","Function4",@WindowsDir&"\system32\calc.exe")
$funcl5 = IniRead($ini,"Label","Function5",@WindowsDir&"\system32\calc.exe")
$funcl6 = IniRead($ini,"Label","Function6",@WindowsDir&"\system32\calc.exe")
$funcl7 = IniRead($ini,"Label","Function7",@WindowsDir&"\system32\calc.exe")
$funcl8 = IniRead($ini,"Label","Function8",@WindowsDir&"\system32\calc.exe")
While 1
Sleep ( 500 )
ToolTip("")
If _IsPressed("04", $dll) Then ; Moje da se smeni s drug buton na mishkata
$ori = MouseGetPos()
SplashImageOn("","gdot.bmp","30","30",$ori[0]-15,$ori[1]-15,1)
Do
Sleep(100)
$cur = MouseGetPos()
If $ori[0] - $cur[0] > 100 And $ori[1] - $cur[1] > 100 Then
ToolTip($funcl1)
ElseIf $ori[0] - $cur[0] < -100 And $ori[1] - $cur[1] > 100 Then
ToolTip($funcl2)
ElseIf $ori[0] - $cur[0] > 100 And $ori[1] - $cur[1] < -100 Then
ToolTip($funcl3)
ElseIf $ori[0] - $cur[0] < -100 And $ori[1] - $cur[1] < -100 Then
ToolTip($funcl4)
ElseIf $ori[0] - $cur[0] > 50 Then
ToolTip($funcl5)
ElseIf $ori[0] - $cur[0] < -50 Then
ToolTip($funcl6)
ElseIf $ori[1] - $cur[1] > 50 Then
ToolTip($funcl7)
ElseIf $ori[1] - $cur[1] < -50 Then
ToolTip($funcl8)
Else
ToolTip("")
EndIf
Until Not(_IsPressed("04", $dll));Moje da se smeni s drug buton na mishkata
$cur = MouseGetPos()
If WinActive("classname=ExploreWClass") Or WinActive("classname=CabinetWClass") Then
If $ori[0] - $cur[0] > 100 And $ori[1] - $cur[1] > 100 Then ; Nagore i naliavo - Back
Send($func1)
ElseIf $ori[0] - $cur[0] < -100 And $ori[1] - $cur[1] > 100 Then ; Nagore i nadiasno - Forward
Send($func2)
ElseIf $ori[0] - $cur[0] > 100 And $ori[1] - $cur[1] < -100 Then ; Nadolu i nalqwo - Minimize
Send($func3)
ElseIf $ori[0] - $cur[0] < -100 And $ori[1] - $cur[1] < -100 Then ; Nadolu i nadiasno - Close
Send($func4)
ElseIf $ori[0] - $cur[0] > 50 Then ; Naliavo - My Docu
ShellExecute($func5)
ElseIf $ori[0] - $cur[0] < -50 Then ; Nadiasno - Disc D:\
ShellExecute($func6)
ElseIf $ori[1] - $cur[1] > 50 Then ; NAGORE - Calculator
ShellExecute($func7)
ElseIf $ori[1] - $cur[1] < -50 Then ; NADOLU - Notepad
RShellExecute($func8)
EndIf
Else
If $ori[0] - $cur[0] > 50 Then ; Naliavo - My Docu
Run($func5)
ElseIf $ori[0] - $cur[0] < -50 Then ; Nadiasno - Disc D:\
Run($func6)
ElseIf $ori[1] - $cur[1] > 50 Then ; NAGORE - Calculator
Run($func7)
ElseIf $ori[1] - $cur[1] < -50 Then ; NADOLU - Notepad
Run($func8)
Else
SplashTextOn("Gestures","No action","250","20","-1","-1",2,"","","")
Sleep(500)
SplashOff()
EndIf
EndIf
SplashOff()
EndIf
WEnd
DllClose($dll) |