-
Notifications
You must be signed in to change notification settings - Fork 0
/
Compile All.ahk
40 lines (34 loc) · 1.14 KB
/
Compile All.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#SingleInstance, force ; Forces only one instance, allows to re-run script without reloading
listAHK := ["Master", "3DConnexion Reset", "Basic Shortcuts", "Quick Status Change", "SOLIDWORKS Reset", "ScriptStart", "Window Wizard", "AppKill", "SOLIDWORKS Kill"]
destFolder := "QI Tools"
For index, AHK in listAHK
{
ahkEXE := % AHK ".exe"
; MsgBox, %ahkEXE%
Process, Exist, % ahkEXE
; MsgBox, % ErrorLevel
While ErrorLevel
{
ToolTip, % "Closing " AHK
Process, Close, % ahkEXE
if not ErrorLevel
{
MsgBox, 16, Error, % "Unable to close " ahkEXE "!`n`nPlease close all scripts manually`nand run ""Run All"" from the`nStart Menu"
ExitApp
}
Process, Exist, % ahkEXE
}
Process, WaitClose, % ahkEXE, 5
if ErrorLevel
MsgBox, "What the hell?"
try
{
ToolTip, % "Compiling " AHK
; RunWait, % "Ahk2Exe.exe /in """ AHK ".ahk"" /icon images/red_q_on_blue_bkgd.ico" ; Run compiler for AHK files
RunWait, % "Ahk2Exe.exe /in """ AHK ".ahk"" /out """ destFolder "\" AHK ".exe"" /icon images/WoosterGraphic.ico" ; Run compiler for AHK files
} catch e {
MsgBox, % "Unable to compile """ AHK """, exiting"
ExitApp
}
}
ToolTip