Hi folks, problem is that this is only supposed to respond to Control key press, and it does, but also responds when i press R-ALT! Try it out...
[ autoit ]
#region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=Paper.ico #AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_Res_Icon_Add=Paper.ico #AutoIt3Wrapper_Run_Tidy=y #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Misc.au3> #include <Constants.au3> #include "image_get_info.au3" Opt("TrayOnEventMode", 1) Opt("TrayAutoPause", 0) Opt("TrayMenuMode", 0) Opt("TrayIconDebug", 1) TraySetClick(16) TraySetToolTip("Paster") TraySetIcon('Paper.ico') FileInstall("Paper.ico", "Paper.ico") FileInstall("image_get_info.au3", "image_get_info.au3") $dll = DllOpen("user32.dll") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run", "Paster", "REG_SZ", "C:\Windows\Paster.exe") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "EnableBalloonTips", "REG_DWORD", "1") Global $key1, $key2, $key3, $key4, $key5, $keyctrl, $keylmb, $WS ;P = 50 ;M = 4D ;B = 42 ;3 = 33 ;7 = 37 ;9 = 39 ;ALT = 12 ;CTRL = 11 $WS = TrayCreateItem("Remove from windows start") TrayItemSetOnEvent($WS, "wstart") Func wstart() TrayItemSetState($WS, $TRAY_UNCHECKED) RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run", "Paster") EndFunc ;==>wstart While 1 Sleep(50) If _IsPressed("11", $dll) Then ;CTRL $keyctrl = 1 ToolTip('CTRL') CTRLkey() ElseIf $keyctrl + $key1 = 2 Then Gmail() ElseIf $keyctrl + $key2 = 2 Then CGD() ElseIf $keyctrl + $key3 = 2 Then PW3() ElseIf $keyctrl + $key4 = 2 Then PW7() ElseIf $keyctrl + $key5 = 2 Then PW9() ElseIf $keyctrl + $keylmb = 2 Then RES() EndIf WEnd DllClose($dll) Func CTRLkey() If _IsPressed("01", $dll) Then ;LMB $keylmb = 1 ElseIf _IsPressed("4D", $dll) Then ;M $key1 = 1 ElseIf _IsPressed("42", $dll) Then ;B $key2 = 1 ElseIf _IsPressed("33", $dll) Then ;3 $key3 = 1 ElseIf _IsPressed("37", $dll) Then ;7 $key4 = 1 ElseIf _IsPressed("39", $dll) Then ;9 $key5 = 1 EndIf Sleep(100) ToolTip('') EndFunc ;==>CTRLkey Func Gmail() Send("@gmail.com") $keyctrl = 0 $key1 = 0 EndFunc ;==>Gmail Func CGD() Send("123") $keyctrl = 0 $key2 = 0 EndFunc ;==>CGD Func PW3() Send("123") $keyctrl = 0 $key3 = 0 EndFunc ;==>PW3 Func PW7() Send("123") $keyctrl = 0 $key4 = 0 EndFunc ;==>PW7 Func PW9() Send("123") $keyctrl = 0 $key5 = 0 EndFunc ;==>PW9 Func RES() $keyctrl = 0 $keylmb = 0 Send("^c") Sleep(50) $file = ClipGet() $aInfo = _ImageGetInfo($file) TrayTip("Resolution", _ImageGetParam($aInfo, "Width") & "x" & _ImageGetParam($aInfo, "Height"), 2, 1) EndFunc ;==>RES