我的屏幕键盘 RTM2.2.101

; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other 
;
; Script Function:
;	Template script (you can customize this template by editing "ShellNewTemplate.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance, Force

; AHK KeyPad   by Seapard
#Persistent
OnMessage(0x404, "AHK_NOTIFYICON") ;单击左键弹出菜单

AHK_NOTIFYICON(wParam, lParam)
{
    if (lParam = 0x202)
    {
        SetTimer, ShowLButtonMenu, -1
        return 0
    }
}


DetectHiddenWindows, On
CoordMode, Mouse, Screen
SetWinDelay, -1
KeyWait, LButton, D, T0.8
MouseGetPos,KBX,KBY
Trans=255
Bre:=2
KBH:=180
KBW:=446
RCap_Flag:=WinDrag:=0
prevent_modifier_key := 0
X:=Y:=M:=N:=0
CNum:=0
SKI := SKI1 := 0
color = DBE2E4    ;c0ebb0 , eeffbb A3B0B5
KeepSend_Flag:=KeepSend2_Flag:=0
Font_Flag:=Arrow_Flag:=Space_Flag:=0
ShowKeyPad_flag:=HideKeyPad_Flag:=0
ShowKeyPad:=HiddenKeyPad:=HiddenChange:=0
ShakeMouse_Flag:=ShakeMouse_LR:=SLR:=0
SetTop:=0
MyProgress:=0
Gui2:=1
SetATop:=Overcast:=0
AutoFloating:=Item1:=Item2:=Track:=0
MFW=0
         floatingwinX = 964
         floatingwinY = 83
Gui, +AlwaysOnTop +LastFound -SysMenu +Owner +OwnDialogs ;+Disabled -Caption +ToolWindow +Background 
Gui, color, %color%

Gosub KeyList

;WinSet, TransColor, F4F4F4
Gui, Show,% "X"KBX-200 "Y"KBY+50 "h"KBH "w"KBW NA, AHK KeyPad   by Seapard
hwnd := WinExist()
If Progress_Flag = 1
GuiControl,, MyProgress, 0
;floatingwin_id := hwnd
WinSet, Transparent, Off, ahk_id %hwnd%
;WinGetClass,keyboard_class,ahk_id %hwnd%
SetTimer, WatchCursor,30
SetTimer, WatchMem,3000
;SetTimer,HideKeyPad,Off
Gosub keypadMenu
Gosub 隐藏
Gosub 定位
Gosub 跟踪
;SetTimer, ShowKeyPad,100
SetTimer, ShakeMouse, 20
SetTimer, Guishow,30
Gosub Space
Return

ShowLButtonMenu:
Gosub keypadMenu
Menu, keypad, Show
return


keypadMenu:
Menu, keypad, Add, 自动隐藏(&H), 隐藏
Menu, keypad, Add, 自动定位(&F), 定位
Menu, keypad, Add, 自动跟踪(&R), 跟踪
Menu, keypad, Add, 键盘重汇(&R), 重汇
;Menu, tray, NoStandard
return


隐藏:
menu, keypad, ToggleCheck, 自动隐藏(&H)
if Item1=0
Item1++
else
Item1--
return

定位:
menu, keypad, ToggleCheck, 自动定位(&F)
if Item2=0
Item2++
else
Item2--
if (RCap_Flag = 1 && Item2=0)
SetTimer, RCap_Item2,300
ELSE 
SetTimer, RCap_Item2,OFF
if (RCap_Flag = 1 && Item2=1)
SetTimer,movefloatingwin,300
ELSE
SetTimer,movefloatingwin,Off
Return

重汇:
sleep 600
Gosub CtrlK
return

跟踪:
menu, keypad, ToggleCheck, 自动跟踪(&R)
if Track=0
Track++
else
Track--
return
/*
if (RCap_Flag = 0 && Track=1)
send {Win Down}
Else
SetTimer, KeyWinC, off
return
*/



WatchMem:
EmptyMem()
Return

WatchCursor:
        MouseGetPos, xss, yss,keyboard_id, WhichControl
        WinGetClass, SetTopClass, ahk_id %keyboard_id%
        WinGetClass, SetAClass, A
        WinGetPos, SetAX, SetAY, SetAW, SetAH, A
        WinGetPos, SetRX, SetRY, SetRW, SetRH, ahk_id %hwnd%
;tooltip,%keyboard_id%
         If (GetKeyState("LButton", "P")=1 || GetKeyState("RButton", "P")=1 )
         ClickHold:=1
         Else
         ClickHold:=0
         If (abs(yss-80)1022)
         SKI1++
         Else
         SKI1--
         If (SKI1>12 && abs(yss-80)1022)
         {
         If !SKI
         ADK_ToolTip("KeyPad")
         SKI := 1
         SKI1 := 30
         }
         Else If SKI130
         SKI1 := 30
        If keyboard_id = %hwnd%                                                   ;1a
        {
        If (HiddenKeyPad = 1  && SKI = 1) {                                                       ;11a
         WinMove,ahk_id %hwnd%, , 1220, 200
         WinSet, Transparent, Off, ahk_id %hwnd%
         Sleep 100
         WinMove,ahk_id %hwnd%, , KeyPad_X, KeyPad_Y-20*8,
         loop,8
         {
         Time:=60-(6*A_Index)
         Sleep % Time
         WinMove,ahk_id %hwnd%, , KeyPad_X, KeyPad_Y-20*(8-A_Index),
         }
         loop,3
         {
         Time:=80-(20*A_Index)
         Sleep % Time
         WinMove,ahk_id %hwnd%, , KeyPad_X, KeyPad_Y-25+(7*A_Index),
         Sleep % Time
         WinMove,ahk_id %hwnd%, , KeyPad_X, KeyPad_Y,
         }

         ;WinMove,ahk_id %hwnd%, , KeyPad_X, KeyPad_Y,
         WinSet, AlwaysOnTop,On, ahk_id %hwnd%
         HiddenKeyPad = 0
         SetTimer, WatchCursor,30
         SetTimer, WatchMem,On
         }                                                                                            ;11b
        if (WhichControl &&  HiddenKeyPad = 0)                         ;12a
        {
         If (WinDrag=1 && GetKeyState("LButton", "P")=0 )
         WinDrag=0
         ;Gosub %WhichControl%
         ;ASK_ToolTip(Key,hwnd)
         ;Gosub, Guishow
         If Progress_Flag = 1
         GuiControl,, MyProgress, 0
         DetectHiddenWindows, Off
         If WinExist("ahk_class ImeCandwinime") {                       ;121a
         WinGetPos, ImeX, ImeY, , , ahk_class ImeCandwinime
         WinGetPos, KeyPad_X, KeyPad_Y, , , ahk_id %hwnd%
         If (Abs(KeyPad_Y-ImeY)0 && ImeY>0) {
         MouseGetPos, PosX, PosY
         SetTimer,ImeWin,-50
         SetTimer, WatchCursor,Off
         }
         }                                                                                        ;121b
         DetectHiddenWindows, On
         If (WinDrag=0)
         Text_Hotkey()
         }                                                                                       ;12b
        Else if HiddenKeyPad = 0                                               ;12a1e
        {
         Gui,2: Destroy
         Text_Hotkey("Off")
         CoordMode, Mouse, Relative
         MouseGetPos,Caption_X,Caption_Y
         if (Caption_X>190  && Caption_X415  && Caption_X215  && Caption_Y0  && Caption_X210  && Caption_Y0  && Caption_X0  && Caption_X(SetAX+SetAW) && (SetRY+SetRH)>(SetAY+SetAH))
        Overcast:=1
         If (Overcast=0 && WinExist("ahk_id" . hwnd2)=0 && WinExist("ahk_class #32768")=0  && WinActive("ahk_class MagicFormation Screen")=0)
        {                                                                                       ;13a
         ;ASK_ToolTip("111",hwnd)
         WinSet, AlwaysOnTop,On, ahk_id %hwnd%
        }                                                                                        ;13b
        SetTop:=SetATop:=Overcast:=0
        AutoFloating = 0
         If Progress_Flag = 1
        GuiControl,, MyProgress, 0
        }                                                                                        ;1b

        Else if HiddenKeyPad = 0      ;keyboard_id != %hwnd%   主要为窗口置顶切换
        {                                                                                       ;1a1e
         Gui,2: Destroy
         WhichControl3 :=
         If (WinDrag=1 && GetKeyState("LButton", "P")=0 )
         WinDrag=0
         if (HiddenKeyPad = 1 && HiddenChange = 0) {         ;11a1e
         ;ASK_ToolTip(HiddenKeyPad,hwnd)
         SetTimer, WatchMem,Off
         SetTimer, WatchCursor,300
         EmptyMem()
         HiddenChange = 1
         Return
         }                                                                                      ;11b1e
         Text_Hotkey("Off")

If (WinActive("A")!=hwnd && Item1=1) {           ;&& SetAClass != "Shell_TrayWnd"    
UD:=LR:=UDLR:=0
If (SetRYSetAY && SetAY=(SetAY-20) && (SetRY+SetRH)SetAY && SetRY(SetAY+SetAH+20) && (SetAY+SetAH)>768)
UD=3
If (SetRXSetAX && SetAX=(SetAX-20) && (SetRX+SetRW)SetAX && SetRX(SetAX+SetAW+20) && (SetAX+SetAW)>1024)
LR=3
If (SetRX>=(SetAX+SetAW) || SetRY>=(SetAY+SetAH) || (SetRX+SetRW)=0 && LR>0) || UDLR=1) && SetTop=0) {                                                    ;121a1e
WinSet, AlwaysOnTop,On, ahk_id %hwnd%
SetTop:=1
SetATop:=0
}                                                                                                                                    ;121b1e    
Else If (((UD=0 || LR=0) && UDLR=0) && SetATop=0) {                                       ;121a1e1e
WinSet, AlwaysOnTop,Off, ahk_id %hwnd%
WinSet, AlwaysOnTop,On,A
WinSet, AlwaysOnTop,Off,A
SetATop:=1
SetTop:=0
}                                                                                                                                   ;121b1e1e
}                                                                                                                                   ;12b1e
}

         Gosub Caption_Off
         Text_Hotkey("Off")
         AutoFloating++
         If Progress_Flag = 1
         GuiControl,, MyProgress, +1
         if (AutoFloating = 600 && HiddenKeyPad = 0)
         Gosub KeyPad_Hidden
         If (HiddenKeyPad = 1)
         AutoFloating = 0
         ;Gosub RCap_Opt
         }                                                                                                                  ;1b1e
Return

KeyPad_Hidden:
         WinGetPos, KeyPad_X, KeyPad_Y, , , ahk_id %hwnd%
         WinMove,ahk_id %hwnd%, , A_ScreenWidth+200, 200
         WinSet, Transparent, 255, ahk_id %Hwnd%
         WinSet, Transparent, 10, ahk_id %Hwnd%
         WinMove,ahk_id %hwnd%, , A_ScreenWidth-4, 200
         WinSet, AlwaysOnTop,On, ahk_id %hwnd%
         If Progress_Flag = 1
         GuiControl,, MyProgress, 0
         HiddenKeyPad = 1
         HiddenChange = 0
Return

ImeWin:
         GetPos:=0
         MouseGetPos, PosX2, PosY2
         loop {
         if (Abs(PosX2-PosX)(ImeY+200) ) {
        NewX := KeyPad_X
        NewY := ImeY+200
        }
        else If (PosX>(ImeX+130) && PosY >(ImeY-60) && PosY(ImeY-60) && PosY20 && ShakeMouse_LR = 0)
        {
         ShakeMouse_Flag++
         ShakeMouse_LR = 1
         }
        Else If ((ShakeMouse_X2-ShakeMouse_X)3 || Abs(ShakeMouse_X2-ShakeMouse_X)>60 || SLR=40)
        ShakeMouse_Flag = 0
        SLR++
        If (SLR=40)
        SLR:=0
        If ((ShakeMouse_Flag > 1) && (A_Cursor = "Ibeam")) {
        Gosub ShakeShow
        /*
        KeyWait, LButton, D, T1
        If !ErrorLevel
        {
        MouseGetPos,KBX,KBY
        WinMove,ahk_id %hwnd%, , KBX-240, KBY+60,
        }
        */
        }
        Return



ShakeShow:
         If (HiddenKeyPad = 1) {
         WinMove,ahk_id %hwnd%, , 1220, 200
         WinSet, Transparent, Off, ahk_id %hwnd%
         }
         MouseGetPos,KBX,KBY
         KBX := KBXShowKeyPad_W-130 && ShowKeyPad_X0 && ShowKeyPad_Y184  && MX3) ;&& floatingwin_id != floatingwin_id2)
        {
        Gosub Caption_On
        keywait,RButton, D T1
        }
         else If floatingwin_id != %floatingwin_id2%
         WinMove, ahk_id %hwnd%, , 754, 60
         SetAX2 :=
         floatingwin_id2 := floatingwin_id
        }
        If (floatingwin_id != hwnd && (SetAX != SetAX2 || SetAY != SetAY2 || SetAW != SetAW2))
        {
        if ((SetAX+SetAW)>1024 || (SetAX+SetAW)1024 || (SetAX+SetAW-270)180  && Caption_X WhichControl3) && (ClickHold=0)) {
;ASK_ToolTip(A_WinDelay,hwnd)
WinGetPos, WinX, WinY, , , ahk_id %hwnd%
ControlGetPos , CX, CY, CW, CH, %WhichControl%, ahk_id %hwnd%
;CBW:=CW-Bre
;CBH:=CH-Bre
IfWinNotExist, ahk_id %hwnd2%
{
Gui, 2:color, 546372    ;546372  c0ebb0
Gui, 2:-Caption +Border +LastFound +ToolWindow +AlwaysOnTop ;
hwnd2 := WinExist()
;WinSet, Region, 0-0 %CW%-0 %CW%-%CH% 0-%CH% 0-0   %Bre%-%Bre% %CBW%-%Bre% %CBW%-%CBH% %Bre%-%CBH% %Bre%-%Bre%, ahk_id %hwnd2%
gui, 2:show,% "x"CX+WinX  "y"CY+WinY-6  "w"CW/1.6 "h"CH/1.6 "na"
WinSet, ExStyle, +0x20, ahk_id %hwnd2% ; WS_EX_TRANSPARENT:=0x20
WinSet, Transparent, 90, ahk_id %hwnd2%
}
Else
;WinSet, Region, 0-0 %CW%-0 %CW%-%CH% 0-%CH% 0-0   %Bre%-%Bre% %CBW%-%Bre% %CBW%-%CBH% %Bre%-%CBH% %Bre%-%Bre%, ahk_id %hwnd2%
;WinMove, ahk_id %hwnd2%, , CX+WinX, CY+WinY-6 , CW, CH
gui, 2:show,% "x"CX+WinX  "y"CY+WinY-6  "w"CW/1.6 "h"CH/1.6 "na"
WhichControl3 := WhichControl
}

Return

Text_Hotkey(Switch="On") {
global WhichControl,key,Caps_State,KeepSend_Flag,WhichControl2
if ((Switch="On") && ((getKeyState("LButton","P")=true || getKeyState("RButton","P")=true)))
KeepSend_Flag++
else
KeepSend_Flag = 0

MouseGetPos, , , hwnd, WhichControl
If (SubStr(WhichControl, 1 , 6) = "Static") {
if WhichControl in Static68,Static70,Static73,Static75
ControlGetText, key ,%WhichControl%,AHK KeyPad   by Seapard
else if (WhichControl != WhichControl2) {
ControlGetText, key ,%WhichControl%,AHK KeyPad   by Seapard
WhichControl2 := WhichControl
}
if key =
key = Space
else if key = Caps
Caps_State := GetKeyState("Capslock", "T")
else if WhichControl in Static68,Static70,Static73,Static75
key = R%key%
if key not in Caps,RShift,RCtrl,RAlt,RWin,Shift,Ctrl,Alt
hotkey,LButton,Send_Key,%Switch%
else
hotkey,LButton,But_%key%,%Switch%
if (StrLen(key) = 1)                                                        ; RightButton || (key = "Ins") || (key = "Psc")
hotkey,*RButton,Send_Key_R,%Switch%
else if key in Left,Right,Up,Down 
hotkey,*RButton,Send_Key_R,%Switch%
else if (SubStr(key, 1 , 1) = "F" && key != "F9")
;else if (SubStr(key, 1 , 1) = "F")
hotkey,*RButton,Send_Key,%Switch%
else if key in Esc,Del,Backsp,Tab,Enter,Menu,PgUp,PgDn,Home,End,BackSpace,AppsKey
hotkey,*RButton,Send_Key,%Switch%
else
hotkey,*RButton,RBut_%key%,%Switch%
if (KeepSend_Flag = 24)
{
SetTimer, KeepSend,30
SetTimer, KeepSend2,5
KeepSend_Flag = 0
SetTimer, WatchCursor,Off
}
}
Else {
hotkey,LButton,Send_Key,Off
hotkey,*RButton,Send_Key,Off
hotkey,*RButton,Send_Key_R,Off
}
}

KeepSend:
if getKeyState("LButton","P")=true
Gosub Send_Key
else if getKeyState("RButton","P")=true
Gosub Send_Key_R
else 
{
SetTimer, WatchCursor,On
SetTimer, KeepSend,Off
}
return

KeepSend2:
if (getKeyState("LButton","P")=false && getKeyState("RButton","P")=false)
{
SetTimer, WatchCursor,On
SetTimer, KeepSend,Off
SetTimer, KeepSend2,Off
KeepSend2_Flag = 0
}
else
KeepSend2_Flag = 1
return

But_key:
But_key()
Return
But_key() {
But_%key%:
Gosub Send_Key
Return
}

RBut_key:
RBut_key()
Return
RBut_key() {
RBut_%key%:
Gosub Send_Key_R
Return
}

RBut_F9:
/*
DetectHiddenWindows, Off
IfWinExist ahk_class ImeCandwinime
Send {enter}{RShift}
DetectHiddenWindows, On
*/
 IME_F9()
Return


RBut_Space:
RBut_Psc:
RBut_PrintScreen:
RBut_Ins:
Gosub %key%
Return



RBut_↑:
RBut_←:
RBut_↓:
RBut_→:
Gosub Send_Key_R
Return

But_Caps:
RBut_Caps:
if Caps_State
    SetCapslockState, off
else
    SetCapslockState, on
Return

But_RShift:
RBut_RShift:
Send {RShift}
Return


But_Shift:
But_Ctrl:
But_RCtrl:
But_Alt:
But_RAlt:
But_RWin:
RBut_Shift:
RBut_Ctrl:
RBut_RCtrl:
RBut_Alt:
RBut_RAlt:
RBut_RWin:
;Modified_Event:
StringSplit, keyArray, A_ThisLabel,_,:
if (keyArray1 = "But") {
send {Blind}{%keyArray2% DownTemp}
Gui, Font, S8 Bold, Comic Sans MS
GuiControl, Font, %WhichControl%
Font_Flag=1
}
else {
send {%keyArray2% Up}
Gui, Font, S9 norm, Comic Sans MS
GuiControl, Font, %WhichControl%
Font_Flag=0
}
;ASK_ToolTip(keyArray2, hwnd)
Return



Send_Key:
Gosub virtual_keytext
Send {Blind}{%key%}
if prevent_modifier_key = 0
Gosub TurnbackFont
Return

Send_Key_R:
Gosub virtual_keytext
if prevent_modifier_key = 0
{
send {Blind}{Shift Down}{%key%}
if (KeepSend2_Flag=0 || getKeyState("RButton","P")=false)
send {Shift Up}
Gosub TurnbackFont
}
else {
send {Blind}{%key%}
}
Return


virtual_keytext:
if key = ↑
key = Up
else if key = ↓
key = Down
else if key = ←
key = Left
else if key = →
key = Right
else if key = Menu
key = AppsKey
else if key = Psc
key = PrintScreen
else if key = Backsp
key = BackSpace
Return

TurnbackFont:
if (KeepSend2_Flag=0 && Font_Flag=1) {
send {Ctrl Up}{Shift Up}{RWin Up}{Alt Up}
Gui, Font, S9 norm, Comic Sans MS
GuiControl, Font, % "Static" . 56+CNum
GuiControl, Font, % "Static" . 69+CNum
GuiControl, Font, % "Static" . 70+CNum
GuiControl, Font, % "Static" . 71+CNum
GuiControl, Font, % "Static" . 73+CNum
GuiControl, Font, % "Static" . 75+CNum
}
Return

Space:
if (Space_Flag = 0) {
GuiControl, Hide, % "Static" . 73+CNum
GuiControl, Hide, % "Static" . 74+CNum
GuiControl, MoveDraw, % "Static" . 72+CNum, x106 y156 w190 h30 +Center, 
Space_Flag = 1
}
else {
GuiControl, Show, % "Static" . 73+CNum
GuiControl, Show, % "Static" . 74+CNum
GuiControl, MoveDraw, % "Static" . 72+CNum, x106 y156 w130 h30 +Center, 
Space_Flag = 0
}
Return
 

SwitchToArrowKey:
Psc:
PrintScreen:
if (Arrow_Flag = 0) {
Gui, Font, S9 norm, Comic Sans MS
ControlSetText, % "Static" . 67+CNum, ↑,ahk_id %hwnd%
ControlSetText, % "Static" . 76+CNum, ←,ahk_id %hwnd%
ControlSetText, % "Static" . 77+CNum, ↓,ahk_id %hwnd%
ControlSetText, % "Static" . 78+CNum, →,ahk_id %hwnd%
ControlSetText, % "Static" . 79+CNum, Ins,ahk_id %hwnd%
GuiControl, Font, % "Static" . 67+CNum
GuiControl, Font, % "Static" . 76+CNum
GuiControl, Font, % "Static" . 77+CNum
GuiControl, Font, % "Static" . 78+CNum
GuiControl, Font, % "Static" . 79+CNum
Arrow_Flag = 1
}
else if (Arrow_Flag = 1) {
Gui, Font, S9 norm, Comic Sans MS
ControlSetText, % "Static" . 67+CNum, /,ahk_id %hwnd%
ControlSetText, % "Static" . 76+CNum, ←,ahk_id %hwnd%
ControlSetText, % "Static" . 77+CNum, →,ahk_id %hwnd%
ControlSetText, % "Static" . 78+CNum, ↑,ahk_id %hwnd%
ControlSetText, % "Static" . 79+CNum, ↓,ahk_id %hwnd%
GuiControl, Font, % "Static" . 67+CNum
GuiControl, Font, % "Static" . 76+CNum
GuiControl, Font, % "Static" . 77+CNum
GuiControl, Font, % "Static" . 78+CNum
GuiControl, Font, % "Static" . 79+CNum
Arrow_Flag = 2
}
else if (Arrow_Flag = 2) {
Gui, Font, S8, Comic Sans MS
ControlSetText, % "Static" . 76+CNum, PgUp,ahk_id %hwnd%
ControlSetText, % "Static" . 77+CNum, PgDn,ahk_id %hwnd%
ControlSetText, % "Static" . 78+CNum, Home,ahk_id %hwnd%
ControlSetText, % "Static" . 79+CNum, End,ahk_id %hwnd%
GuiControl, Font, % "Static" . 76+CNum
GuiControl, Font, % "Static" . 77+CNum
GuiControl, Font, % "Static" . 78+CNum
GuiControl, Font, % "Static" . 79+CNum
Arrow_Flag = 0
}
Return
;-------------------------------------------------

EmptyMem(PID="AHK Rocks"){
pid:=(pid="AHK Rocks") ? DllCall("GetCurrentProcessId") : pid
h:=DllCall("OpenProcess", "UInt", 0x001F0FFF, "Int", 0, "Int", pid)
DllCall("SetProcessWorkingSetSize", "UInt", h, "Int", -1, "Int", -1)
DllCall("CloseHandle", "Int", h)
}



Overscreen(X=0,Y=0,M=0,N=0){
If ((X-Y)>570 && M=0 && N=0)
  overvar := 570
else if ((X-Y)=0 && M=0 && N=0)
  overvar := X-Y
else If ((X-Y)570 && X=0 && Y=0)
  overvar := 570
else if ((M-N)=0 && X=0 && Y=0)
  overvar := M-N
else If ((M-N) -5000) {
send {LCtrl Down}{Left}{LCtrl Up}
IfWinExist ahk_class ImeStatuswinime
send {RShift}
Else {
send {RShift}
Return
}
}
WinGetPos , Ime_X, Ime_Y, , , ahk_class ImeStatuswinime
loop 
{
if (Ime_X=-5000) {
send {LCtrl Down}{Left}{LCtrl Up}
}
WinGetPos , Ime_X, Ime_Y, , , ahk_class ImeStatuswinime
IfWinExist ahk_class ImeStatuswinime
if (Ime_X  -5000) {
send {LCtrl Down}{Left}{LCtrl Up}
send {RShift}
break
}
if Ime_X=-5000
send {RShift}
}
}
Else 
{
send {LCtrl Down}{Left}{LCtrl Up}
IfWinNotExist ahk_class ImeStatuswinime
send {RShift}
send {LCtrl Down}{Left}{LCtrl Up}
send {RShift}
}
DetectHiddenWindows, On
Return

F8::
DetectHiddenWindows, Off
IfWinExist ahk_class ImeStatuswinime
{
WinGetPos , Ime_X, Ime_Y, , , ahk_class ImeStatuswinime
if (Ime_X  -5000) {
send {LCtrl Down}{Left}{LCtrl Up}
IfWinExist ahk_class ImeStatuswinime
send {RShift}
}
loop 
{
WinGetPos , Ime_X, Ime_Y, , , ahk_class ImeStatuswinime
if (Ime_X=-5000) {
send {LCtrl Down}{Left}{LCtrl Up}
}
WinGetPos , Ime_X, Ime_Y, , , ahk_class ImeStatuswinime
IfWinExist ahk_class ImeStatuswinime
if (Ime_X  -5000) {
send {LCtrl Down}{Left}{LCtrl Up}
break
}
if Ime_X=-5000
send {RShift}
}
}
Else 
{
send {LCtrl Down}{Left}{LCtrl Up}
IfWinNotExist ahk_class ImeStatuswinime
send {RShift}
send {LCtrl Down}{Left}{LCtrl Up}
}
DetectHiddenWindows, On
Return
*/

#UseHook  ;在此点后强制给热键使用钩子。
Ins::send #^+!p
#UseHook off



#IfWinExist ahk_class ImeCandwinime
^!b::ASK_ToolTip("Ctrl-Alt-b已禁用",hwnd)
#IfWinExist

#^!+p::
if prevent_modifier_key = 1
{
prevent_modifier_key := 0
send {Ctrl Up}{Shift Up}{LWin Up}{Alt Up}
ASK_ToolTip("禁用粘滞",hwnd)
}
else
{
prevent_modifier_key := 1
ASK_ToolTip("启用粘滞",hwnd)
}
return


^k::
CtrlK:
MouseGetPos,KBX,KBY
;Gui, Show,hide
WinSet, Region, 184-3 W34 H24, ahk_id %hwnd%
WinSet, Region, , ahk_id %hwnd%
WinSet, Transparent, Off, ahk_id %hwnd%
Gui, Show,% "X"KBX-200 "Y"KBY+50 "h"KBH "w"KBW NA, AHK KeyPad   by Seapard
if RCap_Flag = 1
RCap_Flag--
Return



#IfWinActive AHK KeyPad   by Seapard
WheelDown::
Trans-=20
if Trans=255
               ;{
                Trans=255
                ;WinSet, Transparent, Off, AHK KeyPad   by Seapard
               ;}
;else
                WinSet, Transparent, %Trans%, AHK KeyPad   by Seapard
return
#IfWinActive
;---------------------------------------

给TA捐赠
共{{data.count}}人
人已捐赠
其他

快速搜索

2020-3-9 2:38:44

其他

我的电脑

2020-3-9 2:40:44

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索