autohotkey啓動/激活Totalcommand(自動輸入註冊數字)

 

#T::

ifwinnotexist ahk_class TTOTAL_CMD

{

run C:/totalcmd/totalcmd.exe

winwait ahk_class TNASTYNAGSCREEN

winactivate ahk_class TNASTYNAGSCREEN

winwaitactive ahk_class TNASTYNAGSCREEN

ControlGetText, OutputVar, TPanel1

ControlGetText, OutputVar, TPanel2 ; it is wierd here. If get text of TPanel2 at first time, the text of TPanel1 will be return

if ErrorLevel   ; if something wrong

   MsgBox, The window does not exist.

else

   send %OutputVar%

}

else

{

   ifwinnotactive ahk_class TTOTAL_CMD

   {

       winactivate ahk_class TTOTAL_CMD

       winwaitactive ahk_class TTOTAL_CMD

   }

}

return

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章