-
-
Save dimm0k/6085751 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CoordMode, ToolTip, Screen | |
reStart: | |
InputBox, scriptName, Name of New Script, % "Current AHK version is: AHK" | |
. ( InStr( A_AhkVersion, "1.0." ) ? "Basic " : InStr( A_AhkVersion, "1.1." ) | |
? "_L " : "Unknown " ) A_AhkVersion,,, 130 | |
If ( ErrorLevel ) | |
ExitApp | |
Else If ( !scriptName ) { | |
MsgBox, You Didn't Enter A Name! | |
GoSub, reStart | |
} | |
Dir := A_MyDocuments "\ACTIVE AHK SCRIPTS\AHK_" scriptName | |
File := Dir "\" scriptName ".ahk" | |
If FileExist( File ) { | |
MsgBox, That File Name Aleady Exists! | |
GoSub, reStart | |
} | |
FileCreateDir, % Dir | |
FileAppend, % "F1::`r`n`r`n`r`n/*`r`n`r`n*/`r`nReturn`r`n`r`nF2::Reload`r`n`r`n" | |
. "ESC::ExitApp" a_tab "; <-- Press escape to exit." | |
. "`r`n`r`n", % File | |
While !FileExist( File ) { | |
ToolTip % "Generating AHK file " scriptName ".ahk ." d.="." ( StrLen(d)>10 ? d:="" : "" ), 10, 10 | |
Sleep, 100 | |
} | |
Run, % Dir | |
WinWait, % Dir | |
Run, Notepad.exe %File%,,, npPid | |
WinWait, % "ahk_pid " npPid | |
ControlSend, Edit1, {down 2}, % "ahk_pid " npPid | |
Run, % File | |
Exitapp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment