Browse Source

增加本地代码

liuyuqi-dellpc 3 years ago
parent
commit
96a28158cf

+ 21 - 0
Excel表格左右移动.ahk

@@ -0,0 +1,21 @@
+
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2019/08/05 07:06:02
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   Shift+鼠标滚轮: Excel表格左右移动
+
+#IfWinActive , ahk_exe EXCEL.EXE
+    ~LShift & WheelUp::
+        ControlGetFocus, fcontrol, A
+        Loop 5
+        ComObjActive("Excel.application").ActiveWindow.SmallScroll(0,0,0,1)
+    Return
+
+    ~LShift & WheelDown::
+        ControlGetFocus, fcontrol, A
+        Loop 5  ; <-- Increase or decrease this value to scroll faster or slower.
+        ComObjActive("Excel.application").ActiveWindow.SmallScroll(0,0,1,0)
+    Return
+#IfWinActive

+ 1 - 1
test/1_基础.ahk

@@ -6,7 +6,7 @@
 
 !n::Run notepad
 
-;上面简洁但阅读不好
+;上面简洁但阅读不好
 !n::
     Run notepad
 Return

+ 28 - 0
test/gui.ahk

@@ -0,0 +1,28 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2020/06/04 10:29:00
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   None
+
+WinGetPos, ActWin_X, ActWin_Y, ActWin_W, ActWin_H, A
+
+transN := 200	; 邑苧業
+Gui, +AlwaysOnTop +ToolWindow -SysMenu -Caption +LastFound
+WinSet, ExStyle, +0x20 ; 報炎刊邑
+WinSet, Transparent, %transN%
+Gui, Color, Black
+Gui, Font, cWhite s20 bold, Arial
+Gui, Add, Text,, 完笥競崔填
+winx := Floor(ActWin_X + ActWin_W/2)-100
+Gui, Show, NoActivate x%winx% y%ActWin_Y% h60 w200
+
+
+Sleep, 1000
+Gui, +LastFound
+Loop, % transN
+    WinSet, Transparent, % (A_Index - transN - 1) * -1
+Gui, Hide
+WinSet, Transparent, % transN
+
+ExitApp

+ 9 - 0
test/sound/响铃.ahk

@@ -0,0 +1,9 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2020/04/21 23:08:33
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   None
+
+;SoundBeep ;
+SoundBeep, 750, 1000 ;

+ 8 - 0
test/windows-poisition.ahk

@@ -0,0 +1,8 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2020/06/04 10:39:23
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   None
+
+WinGetPos, ActWin_X, ActWin_Y, ActWin_W, ActWin_H, A

+ 38 - 0
test/对某软件设置快捷键.ahk

@@ -0,0 +1,38 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2019/08/05 07:06:02
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   AHK默认全局,可以设置针对某一窗口执行快捷键
+
+; win+space  
+#space:: 
+    IfWinExist, Untitled - Notepad
+        WinActivate
+    else
+        WinActivate, Calculator
+Return
+
+; ctrl+w
+^w::
+    if WinActive("ahk_class Notepad") or WinActive("ahk_class" . ClassName)
+        WinClose
+Return
+
+
+; ctrl+i
+^i::
+    IfWinActive, Untitled - Notepad {
+        WinMaximize
+        Send, Some text.{Enter}
+        return
+    }
+Return
+
+
+#IfWinActive ahk_class Notepad
+#z::
+#IfWinActive ahk_class WordPadClass
+#z::
+MsgBox You pressed Win+Z in either Notepad or WordPad.
+Return

+ 5 - 0
test/常用语缩写.ahk

@@ -0,0 +1,5 @@
+::/mail::gmail@gmail.com
+::/jeff::https://www.jeffjade.com/
+::/con::console.log();
+::/js::javascript:;
+::/fk::轩先生这会子肯定在忙,请骚后。thx。祝君:天天开心,日日欣悦。

+ 23 - 0
test/鼠标快捷键.ahk

@@ -0,0 +1,23 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2019/08/05 07:06:02
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   
+
+
+
+
+; ctrl+向下滚轮,默认放大
+^WheelDown::
+    MsgBox, "不放大"
+Return
+
+; ctrl+向上滚轮,默认缩小
+^WheelUp::
+    MsgBox, "不缩小"
+Return
+
+
+
+MouseClick, left, 55, 233

+ 65 - 17
win+enter_窗体顶置.ahk

@@ -1,22 +1,70 @@
-; @Author  : liuyuqi
-; @Contact : liuyuqi.gov@msn.cn
-; @Time    : 2015/07/21
-; @Version : 1.0
-; @Desc    : win+space鍒囨崲绐楀彛椤剁疆
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2019/08/05 07:06:02
+; @Version :   2.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   win+enter不太好用,改为:alt+D切换窗口顶置。拼音记忆:顶置(D,Z)。D控制顶置,Z控制透明度。
+;              v2.0 :取消Z快捷键,合并为一个快捷键。D0Z0,D1Z0,D1Z1
 
-#space:: 
-	WinGetActiveTitle, w     	;灏嗗綋鍓嶆縺娲荤獥鍙e瓨鍏ュ彉閲弚
-	Winset, AlwaysOnTop, Toggle, %w%
-	WinSet, Transparent, 150, A
+
+transN := 200 ; 透明度
+Gui, +AlwaysOnTop +ToolWindow -SysMenu -Caption +LastFound
+WinSet, ExStyle, +0x20 ; 鼠标穿透
+WinSet, Transparent, %transN%
+Gui, Color, Black
+Gui, Font, cWhite s18 bold, Arial
+Gui, Add, Text, vHotkeyText Center
+
+global flag := 3
+!D::
+    WinGetActiveTitle, w         ;将当前激活窗口存入变量w
+    if(flag = 0){
+        Winset, AlwaysOnTop, Off, %w%
+        WinSet, Transparent, Off, A    ;不顶置不透明
+        ShowMsg("不顶置不透明")
+        flag := 3
+    } else if (flag = 2){
+        Winset, AlwaysOnTop, On, %w%
+        WinSet, Transparent, Off, A    ;顶置不透明
+        ShowMsg("顶置不透明")
+        flag := 0
+    } else if (flag = 3){
+        Winset, AlwaysOnTop, On, %w%
+        WinSet, Transparent, 150, A    ;顶置透明
+        ShowMsg("顶置透明")
+        flag := 2
+    }
 Return
 
-#t::
-	WinGetActiveTitle, w
-	WinSet, Transparent, 150, A    ;閫忔槑0-255
+!Z::
+    if(flag = True){
+            WinSet, Transparent, Off, A    ;透明0-255
+            flag := False
+    }else{
+            WinSet, Transparent, 150, A    ;透明0-255
+            flag := True
+    }
 Return
 
-#y::
-	WinGetActiveTitle, w
-	Winset, AlwaysOnTop, Off , %w%
-	WinSet, Transparent, Off, A
-Return
+ShowMsg(Msg){
+	GuiControl, , HotkeyText, %Msg%
+    WinGetPos, ActWin_X, ActWin_Y, ActWin_W, ActWin_H, A
+	GuiControl, Move, HotkeyText, w150 center
+    winx := Floor(ActWin_X + ActWin_W/2)-100
+	Try{
+        Gui, Show,  x%winx% y%ActWin_Y% h60 w200
+	}
+    FadeOut()
+}
+FadeOut(sleep = 1000){
+	global transN
+	Sleep, %Sleep%
+	Gui, +LastFound
+
+	Loop, % transN
+		WinSet, Transparent, % (A_Index - transN - 1) * -1
+
+	Gui, Hide
+	WinSet, Transparent, % transN
+}
+; esc::ExitApp

+ 22 - 0
中键2ctrl_F9.ahk

@@ -0,0 +1,22 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2019/08/05 07:06:02
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   鼠标操作替换键盘操作: 鼠标中键替换 Ctrl+F9 按键
+;   需求,在 录屏时需要按Ctrl+F9暂停视频,换鼠标中键操作极为简单。
+
+MButton::
+    ; 录屏软件快捷键
+    ;^F9
+    SendInput ^{F9}
+    ; Potplayer 暂停
+    SendInput ^{F10}
+
+    ; 电子教鞭快捷键
+    ;  SendInput  {F9}
+
+
+Return
+
+; esc::ExitApp

+ 14 - 0
中键2shift_enter.ahk

@@ -0,0 +1,14 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2019/08/05 07:06:02
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   鼠标操作替换键盘操作: 鼠标中键替换 Shift+Enter 按键
+;   需求,在 vscode 中按 Shift+Enter 来执行选中代码,但我希望鼠标中键执行选中代码。
+
+#IfWinActive, ahk_exe Code.exe
+    MButton::+Enter
+    Return
+#IfWinActive
+
+esc::ExitApp

+ 27 - 0
双按.ahk

@@ -0,0 +1,27 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2020/03/13 17:06:40
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   双按Home熄屏
+
+~Home::
+    If(Home_Press>0){
+        Home_Press+=1
+        Return
+    }
+    Home_Press=1
+    SetTimer,KeyHome,300
+Return
+
+
+KeyHome:
+    SetTimer,KeyHome,Off
+    If(Home_Press=2){
+        Sleep 1000
+        SendMessage, 0x112,0xF170,2,,Program Manager
+    }
+    Home_Press=0
+Return
+
+

+ 12 - 18
双按Home键熄屏.ahk

@@ -1,23 +1,17 @@
-; @Author  : liuyuqi
-; @Contact : liuyuqi.gov@msn.cn
-; @Time    : 2015/07/21
-; @Version : 1.0
-; @Desc    : 双按Home键熄屏
-
 ~Home::
-    If (Home_Presses > 0){
-        Home_Presses += 1
-        Return
-    }
-    Home_Presses = 1
-    SetTimer, KeyHome, 300
+	If Home_Presses > 0 {
+		Home_Presses += 1
+		Return
+	}
+	Home_Presses = 1
+	SetTimer, KeyHome, 300
 Return
 
 KeyHome:
-    SetTimer, KeyHome, Off
-    If (Home_Presses = 2){
-        Sleep 1000
-        SendMessage, 0x112, 0xF170, 2,, Program Manager
-    }
-    Home_Presses = 0
+	SetTimer, KeyHome, Off
+	If Home_Presses = 2 {
+		Sleep 1000
+		SendMessage, 0x112, 0xF170, 2,, Program Manager
+	}
+	Home_Presses = 0
 Return

+ 1 - 5
大写键为Enter键.ahk

@@ -1,8 +1,4 @@
-; @Author  : liuyuqi
-; @Contact : liuyuqi.gov@msn.cn
-; @Time    : 2015/07/21
-; @Version : 1.0
-; @Desc    : replace CapsLock to LeftEnter; CapsLock = Alt + CapsLock
+;replace CapsLock to LeftEnter; CapsLock = Alt + CapsLock
 $CapsLock::
 	Enter
 Return

+ 20 - 0
字幕快捷键.ahk

@@ -0,0 +1,20 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2020/03/26 23:31:15
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   配合 Aegisub 软件:添加 Caps Lock :播放() ;Tab:上一句()
+
+; CapsLock 播放
+CapsLock::
+    ;MouseClick, left, 68, 310
+    MouseClick, left, 33, 491
+Return
+
+; 上一句
+Tab::
+    MouseClick, left, 24, 310
+Return
+
+; esc::ExitApp
+

+ 114 - 0
快捷复制粘贴.ahk

@@ -0,0 +1,114 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2019/08/05 07:06:02
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   鼠标操作:左键拖选复制 + 中键粘贴 + 长按中键滚动
+
+$*MButton::
+    Hotkey, $*MButton Up, MButtonup, off
+    KeyWait, MButton, T0.15
+    If ErrorLevel = 1
+    {
+        Hotkey, $*MButton Up, MButtonup, on
+        MouseGetPos, ox, oy
+        SetTimer, WatchTheMouse, 1
+        SystemCursor("Toggle")
+    }
+    Else    {
+        Send {LButton}
+        SendInput ^v
+    }
+Return
+
+; 左键拖选复制
+~LButton::
+    cos_mousedrag_treshold := 20 ; pixels
+    MouseGetPos, cos_mousedrag_x, cos_mousedrag_y
+    win1 := WinActive("A")
+    KeyWait LButton
+    MouseGetPos, cos_mousedrag_x2, cos_mousedrag_y2
+    win2 := WinActive("A")
+    WinGetClass cos_class, A
+    if(((abs(cos_mousedrag_x2 - cos_mousedrag_x) > cos_mousedrag_treshold
+    or abs(cos_mousedrag_y2 - cos_mousedrag_y) > cos_mousedrag_treshold)) and win1 = win2 
+    and cos_class != "ConsoleWindowClass")
+    {
+        SendInput ^c ; Ctrl+C复制
+    }
+Return
+ 
+; Shift+中键点击
++MButton::
+    Send {MButton}
+Return
+
+MButtonup:
+    Hotkey, $*MButton Up, MButtonup, off
+    SetTimer, WatchTheMouse, off
+    SystemCursor("Toggle")
+Return
+
+WatchTheMouse:
+    MouseGetPos, nx, ny
+    dy := ny-oy
+    dx := nx-ox
+    If (dx**2 > 0 and dx**2>dy**2) ;edit 4 for sensitivity (changes sensitivity to movement)
+    {
+        times := Abs(dy)/1 ;edit 1 for sensitivity (changes frequency of scroll signal)
+        Loop, %times%
+        {
+            If (dx > 0)
+                Click WheelRight
+            Else
+                Click WheelLeft
+        }
+    }
+    If (dy**2 > 0 and dy**2>dx**2) ;edit 0 for sensitivity (changes sensitivity to movement)
+    {
+        times := Abs(dy)/1 ;edit 1 for sensitivity (changes frequency of scroll signal)
+        Loop, %times% 
+        {
+            If (dy > 0)
+                Click WheelDown
+            Else
+                Click WheelUp
+        }   
+    }
+    MouseMove ox, oy
+Return
+ 
+SystemCursor(OnOff=1)   ; INIT = "I","Init"; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = others
+    {
+        static AndMask, XorMask, $, h_cursor
+            ,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13 ; system cursors
+            , b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13   ; blank cursors
+            , h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13   ; handles of default cursors
+        if (OnOff = "Init" or OnOff = "I" or $ = "")       ; init when requested or at first call
+        {
+            $ = h                                          ; active default cursors
+            VarSetCapacity( h_cursor,4444, 1 )
+            VarSetCapacity( AndMask, 32*4, 0xFF )
+            VarSetCapacity( XorMask, 32*4, 0 )
+            system_cursors = 32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650
+            StringSplit c, system_cursors, `,
+            Loop %c0%
+            {
+                h_cursor   := DllCall( "LoadCursor", "uint",0, "uint",c%A_Index% )
+                h%A_Index% := DllCall( "CopyImage",  "uint",h_cursor, "uint",2, "int",0, "int",0, "uint",0 )
+                b%A_Index% := DllCall("CreateCursor","uint",0, "int",0, "int",0
+                    , "int",32, "int",32, "uint",&AndMask, "uint",&XorMask )
+            }
+        }
+        if (OnOff = 0 or OnOff = "Off" or $ = "h" and (OnOff < 0 or OnOff = "Toggle" or OnOff = "T"))
+            $ = b  ; use blank cursors
+        else
+            $ = h  ; use the saved cursors
+    
+        Loop %c0%
+        {
+            h_cursor := DllCall( "CopyImage", "uint",%$%%A_Index%, "uint",2, "int",0, "int",0, "uint",0 )
+            DllCall( "SetSystemCursor", "uint",h_cursor, "uint",c%A_Index% )
+        }
+    }
+Return

+ 16 - 7
显示组合键.ahk

@@ -1,14 +1,10 @@
-; @Author  : liuyuqi
-; @Contact : liuyuqi.gov@msn.cn
-; @Time    : 2015/2/12
-; @Version : 1.1
-; @Desc    : 显示组合键
-
 #SingleInstance force
 #NoEnv
 SetBatchLines, -1
 
 transN := 200	; 透明度
+
+
 ; #################################
 ;		GUI
 ; #################################
@@ -41,6 +37,7 @@ Loop, parse, Otherkeys, |
 
 Return
 
+
 ; #################################
 ;		显示按键
 ; #################################
@@ -48,38 +45,50 @@ Return
 Display:
 	If A_ThisHotkey =
 		Return
+
 	mods := "Ctrl|Shift|Alt|LWin|RWin"
 	prefix =
+
 	Loop, Parse, mods, |
 		if GetKeyState(A_LoopField)
 			prefix := prefix A_LoopField " + "
+
 	if !prefix		; 如果没有组合键则不显示
 		Return
+
 	key := SubStr(A_ThisHotkey, 3)
 	if (key = " ")
 		key := "Space"
+
 	ShowHotkey(prefix key)
 	FadeOut()
 Return
 
+
+; ===================================================================================
 ShowHotkey(Hotkey)
 {
 	GuiControl, , HotkeyText, %Hotkey%
+
 	WinGetPos, ActWin_X, ActWin_Y, ActWin_W, ActWin_H, A
 	text_w := ActWin_W, gui_y := (ActWin_Y + ActWin_H) - 100 -50 ;gui_y可能会
 	GuiControl, Move, HotkeyText, w%text_w% center
 	Try{
 		Gui, Show, NoActivate x%ActWin_X% y%gui_y% h115 w%text_w%
-	}		
+	}
+		
 }
 
 FadeOut(sleep = 1000)
 {
 	global transN
+
 	Sleep, %Sleep%
 	Gui, +LastFound
+
 	Loop, % transN
 		WinSet, Transparent, % (A_Index - transN - 1) * -1
+
 	Gui, Hide
 	WinSet, Transparent, % transN
 }

+ 33 - 0
验证码输入.ahk

@@ -0,0 +1,33 @@
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2020/08/13 01:17:53
+; @License :   (C)Copyright 2019 liuyuqi.
+; @EnCode  :   GB2312
+; @Desc    :   115 网址验证码输入
+
+
+i:=5214
+
+ShowMsg(i){
+    MouseClick, left, 597, 420
+    ;清除输入框
+    Send {Backspace}
+    Send {Backspace}
+    Send {Backspace}
+    Send {Backspace}
+    ; 输入验证码
+    SendInput %i%
+    ; Sleep, 300
+    MouseClick, left, 667, 482
+}
+
+; ctrl+L 快捷键触发
+^l::
+    Loop, 6000{
+        ShowMsg(i)
+        i++
+    }
+Return
+
+
+
+

+ 33 - 0
鼠标手势.ahk

@@ -0,0 +1,33 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2019/08/05 07:06:02
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   鼠标手势
+
+rbutton::    
+  minGap  = 30 ; 设定的识别阈值,大于此阈值,说明在某方向上有移动
+  mousegetpos xpos1,ypos1
+  Keywait, RButton, U
+  mousegetpos xpos2, ypos2
+  if (abs(xpos1-xpos2) < minGap and abs(ypos1-ypos2)<minGap) ; nothing 没有运动,直接输出rbutton 
+  send, {rbutton}
+  else if (xpos1-xpos2 > minGap and abs(ypos1-ypos2)<minGap) ; left  delete(对于文件或选定的字符有效)
+   send, {delete}
+  else if (xpos2-xpos1 > minGap and abs(ypos1-ypos2)<minGap) ; right ctrl+z 恢复  
+   send, ^z
+  else if (abs(xpos1-xpos2)< minGap and (ypos1-ypos2)>minGap) ; up 最大化窗口, win+up
+    send, #{up}
+  else if (abs(xpos1-xpos2)< minGap and (ypos2-ypos1)>minGap) ; down 显示桌面, win+d
+    send, #d
+  else if (ypos2-ypos1 > minGap and (xpos1-xpos2) > minGap) ; down and left , ctrl+shift+T
+    send, ^+t
+  else if (ypos2-ypos1 > minGap and (xpos2-xpos1) > minGap) ; down and right, ctrl+w
+    send, ^w
+  else if (ypos1-ypos2 > minGap and (xpos2-xpos1) > minGap) ; up and right alt+f4
+   send, !{F4}
+  else if (ypos1-ypos2 > minGap and (xpos1-xpos2) > minGap) ; up and left nothing
+   send, {rbutton}
+  else  
+    send, {rbutton}
+  return

+ 31 - 0
鼠标手势多桌面切换.ahk

@@ -0,0 +1,31 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2019/08/05 07:06:02
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   鼠标手势多桌面切换
+
+RButton::
+  mousegetpos xpos1,ypos1
+  settimer,gtrack,1               
+Return
+
+RButton up::
+  settimer,gtrack,off
+  if (gtrack = ""){
+    Click, Right
+  }else{
+    MsgBox, %gtrack%
+  }
+  gtrack=
+Return
+
+gtrack:
+  mousegetpos xpos2,ypos2
+  track:=(abs(ypos1-ypos2)>abs(xpos1-xpos2)) ? (ypos1>ypos2 ? "u" : "d") : (xpos1>xpos2 ? "l" : "r") 
+  if (track<>SubStr(gtrack, 0)) and (abs(ypos1-ypos2)>4 or abs(xpos1-xpos2)>4)
+    gtrack.=track
+  xpos1:=xpos2,ypos1:=ypos2
+Return
+
+esc::exitapp

+ 21 - 0
鼠标教鞭.ahk

@@ -0,0 +1,21 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2019/08/05 07:06:02
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   电子教鞭 F9 改为鼠标右键左滑
+
+;右键触发
+RButton::
+    minGap  = 30 ;
+    MouseGetPos xpos1,ypos1
+    Keywait, RButton, U
+    MouseGetPos xpos2, ypos2
+    if (xpos2-xpos1 > minGap and abs(ypos1-ypos2)<minGap) ; right
+        send, {F9}
+    else
+        send, {RButton}
+Return
+
+esc::ExitApp
+

+ 36 - 0
鼠标教鞭zoomit.ahk

@@ -0,0 +1,36 @@
+; @Author  :   liuyuqi
+; @Contact :   liuyuqi.gov@msn.cn
+; @Time    :   2019/08/05 07:06:02
+; @Version :   1.0
+; @License :   (C)Copyright 2019 liuyuqi.
+; @Desc    :   ZoomIn Ctrl+2 改为鼠标右键左滑
+
+;右键
+触发
+
+global flag := 0
+
+
+
+RButton::
+    minGap  = 30 ;
+    MouseGetPos xpos1,ypos1
+    Keywait, RButton, U
+    MouseGetPos xpos2, ypos2
+    if (xpos2-xpos1 > minGap and abs(ypos1-ypos2)<minGap){
+        if(flag){
+            ;send, {Esc}
+            send, ^{2}
+            flag := 0
+        }else{
+            send, ^{2}
+            flag := 1
+        }
+    }else{
+        send, {RButton}
+    }
+Return
+
+; esc::ExitApp
+
+