global space_up
;{ 新 space 脚本
Space Up::
global space_up := true
Send, {F18}
sendinput {Space Up}
return
Space::
if AnyKeyPressedOtherThanSpace(){
SendInput, {Blind}{Space}
Return
}
space_up := False
inputed := False
wordformatcopy := 0
input, UserInput, L1 T0.05, {F18}
if (space_up){
Send, {Blind}{Space}
return
}else if (StrLen(UserInput) == 1){
Send, {Space}%UserInput%
return
}
while true{
input, UserInput, L1, {LControl}{RControl}{LAlt}{RAlt}{LWin}{RWin}{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{Capslock}{Numlock}{PrintScreen}{Pause}{Tab}{F18}{F23}{RButton}
;~ MsgBox %ErrorLevel%
if (space_up){
if (!inputed){
Send, {Blind}{Space}
}
break
return
}else if (UserInput == "``"){
return
}else if (ErrorLevel="EndKey:Tab"){
SendKey("{Down}")
;~ return
}else if (ErrorLevel="EndKey:LWin"){
Send, {Space}
;~ return
}else if (ErrorLevel="EndKey:RWin"){
SendKey("{Left}")
}else if (ErrorLevel="EndKey:F1"){
SendKey("{Left}", 8)
return
}else if (ErrorLevel="EndKey:F2"){
return
}else if (ErrorLevel="EndKey:F3"){
sendinput !p
return
}else if (ErrorLevel="EndKey:F4"){
wingettitle, ut, A
if ut = Adobe Photoshop CC 2015
Send, !{F4}
else
{
SendInput ^w
Sleep 100
SendInput n{Enter}
}
return
}else if (StrLen(UserInput) == 1) {
inputed := True ;;;;;;;;;;;;;;;正式开始;;;;;;;;;;;;;;;
if (UserInput == "w")
Send, {up}
;~ return
else if (UserInput == "s")
Send, {Down}
;~ return
else if (UserInput == "a")
Send, {Left}
else if (UserInput == "d")
Send, {Right}
else if (UserInput == "W")
Send, !]
;~ return
else if (UserInput == "S")
return
else if (UserInput == "A")
return
else if (UserInput == "D")
return
else if (UserInput == "1")
return
else if (UserInput == "2")
return
else if (UserInput == "3")
return
else if (UserInput == "4")
return
else if (UserInput == "5")
return
else if (UserInput == ","){
return
}else if (UserInput == "."){
return
}else if (UserInput == "6"){
return
}else if (UserInput == "b"){
return
}else if (UserInput == "c"){
Send, i
return
}else if (UserInput == "C"){
return
}else if (UserInput == "e"){
return
}else if (UserInput == "E"){
return
}else if (UserInput == "f"){
return
}else if (UserInput == "F"){
return
}else if (UserInput == "g"){
Send, ^g
;~ return
}else if (UserInput == "G"){
return
}else if (UserInput == "h"){
return
}else if (UserInput == "H"){
return
}else if (UserInput == "i"){
Send, ^i
;~ return
}else if (UserInput == "j"){
Send, ^j
return
}else if (UserInput == "k"){
return
}else if (UserInput == "l"){
return
}else if (UserInput == "m"){
return
}else if (UserInput == "n"){
send, ^n
send, {Enter}
return
}else if (UserInput == "o"){
send, ^o
return
}else if (UserInput == "p"){
return
}else if (UserInput == "q"){
QuickInputList=
(Ltrim
--[家庭]--
&2)甜甜
&b)爸爸
--[工作]--
&z)庄大彪
&Z)李大新
--[供应商]--
&j)胡瑛
&t)周丽娟
--[朋友]--
&w)李平
&e)李红钢
)
MySub_QuickInputtx(QuickInputList)
return
}else if (UserInput == "r"){
return
}else if (UserInput == "t"){
return
}else if (UserInput == "u"){
send ^+z
;~ return
}else if (UserInput == "v"){
Send, {NumpadAdd}
;~ return
}else if (UserInput == "x"){
send, x
;~ return
}else if (UserInput == "y"){
return
}else if (UserInput == "z"){
try {
SetTitleMatchMode RegEx
SetTitleMatchMode Slow
ControlClick, i).*确定|OK.*, A
} catch e {
ControlClick, Button1, A
}
return
}else if (UserInput == "Z"){
return
}else if (UserInput == "["){
return
}else if (UserInput == "]"){
return
}else if (UserInput == "/"){
;~ Run %a_scriptdir%\Apps\Word\Vim-Word.jpg
return
}else if (UserInput == "="){
return
}else if (UserInput == "-"){
return
}else
Send, {Blind}%UserInput%
}
}
return
;}
MySub_QuickInputtx(String){
menu,KyMenu_QuickInput,Add
menu,KyMenu_QuickInput,DeleteAll
Loop,parse,String,`n,`r
{
if (A_LoopField="")
continue
if (A_LoopField="-")
menu,KyMenu_QuickInput,Add
else
menu,KyMenu_QuickInput,Add,% A_LoopField,KyMenu_QuickInput_Handlertx
}
menu,KyMenu_QuickInput,show
return
KyMenu_QuickInput_Handlertx:
PostMessage, 0x50, 0, 0x4090409, , A ;切换为英文 0x4090409=67699721
outputStr:=substr(A_ThisMenuItem,4,strlen(A_ThisMenuItem))
;~ if GetKeyState("Shift")
;~ Stringupper, outputStr, outputStr
sendinput ^!z
Sleep 300
SendInput {raw}%outputStr%
Sleep 300
SendInput {Enter}
PostMessage, 0x50, 0, 0x8040804, , A ;切换为中文 0x8040804=134481924
return
}
AnyKeyPressedOtherThanSpace(mode = "P") {
keys = 1234567890-=qwertyuiop[]\asdfghjkl;'zxcvbnm,./
Loop, Parse, keys
{
isDown := GetKeyState(A_LoopField, mode)
if(isDown)
return True
}
return False
}