|
阅读:306回复:0
搜狗顶功输入法
搜狗拼音按67890输入横竖撇点折,自动顶屏,按capslock键清空编码,ahk1脚本
#NoEnv#SingleInstance Force SendMode InputSetWorkingDir %A_ScriptDir% if !(A_IsAdmin || InStr(DllCall("GetCommandLine", "str"), ".exe"" /r"))Run % "*RunAs " (s:=A_IsCompiled ? "" : A_AhkPath " /r ") """" A_ScriptFullPath """" (s ? "" : " /r") global State := 0 ; 状态0时:0、9、8、7、6键的特殊处理 $0::$9:: $8::$7:: $6:: If !WinExist("ahk_class SoPY_Comp") { ; 状态1时正常输出数字 Send, % SubStr(A_ThisHotkey, 2, 1) return } if (State = 0) { Send, {Tab} } if (A_ThisHotkey = "$6") Send, h else if (A_ThisHotkey = "$7") Send, s else if (A_ThisHotkey = "$8") Send, p else if (A_ThisHotkey = "$9") Send, n else if (A_ThisHotkey = "$0") Send, z State := 1return ; 状态1时:a~z键的特殊处理 $a::$b:: $c::$d:: $e::$f:: $g::$h:: $i::$j:: $k::$l:: $m::$n:: $o::$p:: $q::$r:: $s::$t:: $u::$v:: $w::$x:: $y::$z:: If WinExist("ahk_class SoPY_Comp") { if (State = 1) { Send, 1 State := 0 } ; 输出对应的字母 key := SubStr(A_ThisHotkey, 2, 1) Send, {blind}%key% return } ; 状态0时正常输出字母 key := SubStr(A_ThisHotkey, 2, 1) Send, {blind}%key%return $capslock:: If WinExist("ahk_class SoPY_Comp") Send, {blind}{Esc} Else SetCapsLockState % !GetKeyState("CapsLock", "T") return ~1::~space:: State := 0 |
|