Code: Select all
gui, 2:destroy
gui, 2:Show,, MyGui
Code: Select all
gui, 2:destroy
gui, 2:Show,, MyGui
Code: Select all
CtrlCount(id) {
WinGet, list, ControlList, ahk_id %id%
RegExReplace(list, "\w+",, count)
return count
}
Code: Select all
DetectHiddenWindows, On
Gui, +HwndGuiID
;Gui, Show
MsgBox, % "No. of controls: " CtrlCount(GuiID)
Gui, Add, Text,, Hello
MsgBox, % "No. of controls: " CtrlCount(GuiID)
Gui, Add, Button, xm, Button
MsgBox, % "No. of controls: " CtrlCount(GuiID)
ExitApp
CtrlCount(id) {
WinGet, list, ControlList, ahk_id %id%
RegExReplace(list, "\w+",, count)
return count
}
Users browsing this forum: peter_ahk, Rohwedder, ShatterCoder and 80 guests