Skip to content

Commit a688c9f

Browse files
authored
Add files via upload
1 parent 920f178 commit a688c9f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

required/convert/converterMod.ahk

+7-7
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,13 @@ modifyAhkv2ConverterOutput(FNOut := "path", script := "code") ;outscript_path
120120
new_outscript .= Format('{}.SetIcon("{}","{}", {})', obj, commaSeparatedCln[1], commaSeparatedCln[2], commaSeparatedCln[3]) "`n"
121121
}
122122
}
123-
else if (menuHandle = 0) && (MenuHandleCount < 1) && InStr(A_LoopField, "MenuHandler") {
123+
else if InStr(A_LoopField, "MenuHandler") {
124+
if (menuHandle = 0) && (MenuHandleCount < 1)
125+
{
126+
menuHandle := 1
127+
new_outscript .= A_LoopField . "`n"
128+
}
124129
; if MenuHandler is found, add a function at the bottom of the app to handle
125-
menuHandle := 1
126-
new_outscript .= A_LoopField . "`n"
127130
}
128131
else if InStr(A_LoopField, "MenuHandler(") {
129132
MenuHandleCount += 1
@@ -168,13 +171,10 @@ modifyAhkv2ConverterOutput(FNOut := "path", script := "code") ;outscript_path
168171
RemoveFunction := true
169172
continue
170173
}
171-
else if InStr(A_LoopField, "OnEvent(`"Close`", GuiEscape)") || InStr(A_LoopField, "OnEvent(`"Escape`", GuiEscape)") || InStr(A_LoopField, "Bind(`"Normal`")") || (A_LoopField = "") || InStr(A_LoopField, ".SetFont()") || InStr(A_LoopField, ".hwnd") || InStr(A_LoopField, "+hWnd") {
174+
else if InStr(A_LoopField, "OnEvent(`"Close`", GuiEscape)") || (Trim(A_LoopField = "Return") || Trim(A_LoopField = "return")) || InStr(A_LoopField, "OnEvent(`"Escape`", GuiEscape)") || InStr(A_LoopField, "Bind(`"Normal`")") || (A_LoopField = "") || InStr(A_LoopField, ".SetFont()") || InStr(A_LoopField, ".hwnd") || InStr(A_LoopField, "+hWnd") {
172175
;remove all if cases
173176
continue
174177
}
175-
else if (Trim(A_LoopField = "Return") || Trim(A_LoopField = "return")) {
176-
continue
177-
}
178178
else if InStr(A_LoopField, "ControlColor(") {
179179
ctrlcolor := 1
180180
RegExMatch(A_LoopField, "0x[a-fA-F0-9]{6}", &match)

0 commit comments

Comments
 (0)