新电脑第一课先配置快捷键
`::
send {backspace}
returncapslock::
send {enter}
return ;========================================================xbutton2::ToolTip,;设置鼠标坐标模式为相对屏幕CoordMode, Mouse, ScreenMouseGetPos, mX0, mY0 , hwndIfWinExist, ahk_id %hwnd%{;获取初始窗口位置WinGetPos, wX0, wY0WinActivate, ahk_id %hwnd%}ElseReturnLoop{GetKeyState, mState, xbutton2, P if mState = U {ToolTip break};获取当前鼠标位置MouseGetPos, mX, mYSetWinDelay, -1WinMove, ahk_id %hwnd%, , wX0+mX-mX0, wY0+mY-mY0}
Return;========================================================xbutton1::
setWinDelay,0
CoordMode,mouse,ScreenMouseGetPos,mx1,my1
WinGetPos,winx,winy,winw,winh,Aloop{;GetKeyState,vstate,LAlt,pGetKeyState,vstate,xbutton1,pif vstate=Ubreak MouseGetPos,mx2,my2xx=% winw + mx2 - mx1yy=% winh + my2 - my1winmove,A,,%winx%,%winy%,%xx%,%yy%sleep,30}
Return;===================调试bug=====================================;有时候冲突,疯狂按下某个键的bug
!^+#q::
^!#q::
^+#q::
!+#q::
+#q::
!#q::
^#q::
#q::
send ^s
Sleep 1000
Reloadsend {alt up}
send {shift up}
send {ctrl up}
send {win up}
return;=================wechat==========================#IfWinActive ahk_exe wechat.exe^w::
send {esc}
return!f:: ;聚焦搜索框
send !l+{tab 2}
return!t::
!z:: ;文件传输transfer
send !l
sleep 200
send +{tab 4}
sleep 300
send {enter 3}
sleep 200
send {enter 3}
return!q:: ;打开表情
send !l{tab 4}{space}
return#IfWinActive;=================msedge==========================#IfWinActive ahk_exe msedge.exe^!h::
PostMessage, 274, 40010
return^!r::
PostMessage, 274, 40022
return^!s::
PostMessage, 274, 40030
return#IfWinActive;========================================================#F1::#.
~right & home:: send {end} ;右键专属用于调整
^#esc:: ;休眠
DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0)
Return#c::Run *RunAs cmd ,,#F::Run C:\Program Files (x86)\Feem 2018\Feem.exe
#T::Run C:\Program Files\Typora\Typora.exe
#N::Run notepad^#p::Run D:\软件\AdobePhotoshopCS4\Adobe Photoshop CS4\Photoshop.exe
^#e::Run "D:\软件\小工具2\Everything-1.4.1.1022.x86\Everything.exe"
^#h::run D:\软件\HBuilderX\HBuilderX.exe;========================================================sendASC(str){
Send % "{ASC 0" . Asc(str) . "}"
}!,:: sendASC(",")
!.:: sendASC(".")!+,:: sendASC("<")
!+.:: sendASC(">")