Code: Select all
foxes =
(
Cambridge
Canterbury
Lancaster
Leicester
Winchester
)
FWC := "55a0ff"
FWFS := "16"
FWFT := "Verdana"
gosub, CreateWindow
gosub, Go
return
CreateWindow:
Gui New, hwndFW
Gui % FW . ": +LabelFW +Resize"
Gui, % FW . ":color", % FWC
Gui, % FW . ":font", % "s" . FWFS, % FWFT
; creating buttons:
sec := " section "
Loop, Parse, foxes, `n, `r
{
If (A_Index > 1)
sec := ""
Gui, % FW . ":add", Button, % sec . " v1Btn" . A_Index . " gButton", % A_LoopField
}
return
Button:
MsgBox % "You've pressed me!`nI am a button"
return
Go:
Gui, % FW . ":show", h350, 1st window
return
FWClose:
Gui % FW . ":Default"
Gui, % FW . ":destroy"
exitapp