autohotkey启动/激活Totalcommand(自动输入注册数字)

http://blog.csdn.net/ryanzll/article/details/6027094

#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

你可能感兴趣的:(autohotkey启动/激活Totalcommand(自动输入注册数字))