@@ -120,10 +120,13 @@ modifyAhkv2ConverterOutput(FNOut := "path", script := "code") ;outscript_path
120
120
new_outscript .= Format ('{}.SetIcon(" {}" ," {}" , {})', obj, commaSeparatedCln[1 ], commaSeparatedCln[2 ], commaSeparatedCln[3 ]) " `n"
121
121
}
122
122
}
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
+ }
124
129
; if MenuHandler is found, add a function at the bottom of the app to handle
125
- menuHandle := 1
126
- new_outscript .= A_LoopField . " `n"
127
130
}
128
131
else if InStr (A_LoopField , " MenuHandler(" ) {
129
132
MenuHandleCount + = 1
@@ -168,13 +171,10 @@ modifyAhkv2ConverterOutput(FNOut := "path", script := "code") ;outscript_path
168
171
RemoveFunction := true
169
172
continue
170
173
}
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" ) {
172
175
; remove all if cases
173
176
continue
174
177
}
175
- else if (Trim (A_LoopField = " Return" ) || Trim (A_LoopField = " return" )) {
176
- continue
177
- }
178
178
else if InStr (A_LoopField , " ControlColor(" ) {
179
179
ctrlcolor := 1
180
180
RegExMatch (A_LoopField , " 0x[a-fA-F0-9]{6}" , & match)
0 commit comments