Link: http://blog.csdn.net/zhangxaochen/article/details/8096740
The following scenario occurs:
The program is a vs2010 project, but the logic is written in Lua. Therefore, when writing Lua, The scite editor provided in Notepad ++ and luaforwindows is used.
However, every time I write code in Notepad ++, I switch to vs2010 to run the program, and then switch back to find the error. It is very troublesome if the number of times is too large. So I want to switch to vs2010 and run the program directly on notepad ++ press Ctrl + F5?
With the autohotkey script, it is easy to implement:
$^F5:: SetTitleMatchMode 2if (WinExist("Microsoft Visual Studio") && not WinActive("Microsoft Visual Studio")){ MyToolTip("vs2010 NOT active", 666) ;ControlSend, , cmd{Enter}, cmd.exe ControlSend, , ^{F5}, Microsoft Visual Studio}else if WinActive("Microsoft Visual Studio"){ SendInput ^{F5} MyToolTip("vs2010 IS active", 666)}else MyToolTip("vs2010 CLOSED", 666)returnMyToolTip(msg, millisecond){ ToolTip, %msg% Sleep millisecond ToolTip}
In this way, if Visual Studio is on and the focus is not on it, for example, if the focus is on notepad ++ or another Editor, press Ctrl + F5 to send Ctrl + F5 to. It eliminates the trouble of switching to vs to run the program.
By the way, we are obligated to promote autohotkey O (?_ =) O, the gospel of shortcut key control:
Http://xbeta.info/autohotkey-guide-2.htm
Http://cn.autohotkey.com/
Link: http://blog.csdn.net/zhangxaochen/article/details/8096740
{Over }}