Custom GUI to replace Msgbox
Posted: 08 Mar 2017, 16:29
Hello,
I made a custom GUI to replace my messagebox so I could change the font, but I can't get the controls of the buttons to work the same way they do when inside a loop. My messagebox code is:
When I press NO, it loops back through an excel spreadsheet and finds the next instance in the database.
I made this GUI:
However, when pressing the buttons on the GUI, nothing happens.
Any idea what I'm missing?
I made a custom GUI to replace my messagebox so I could change the font, but I can't get the controls of the buttons to work the same way they do when inside a loop. My messagebox code is:
Code: Select all
MsgBox,3, Customer Storage Information ,% "Row number: " c.row "`n"
. "Customer Number : " cnumber "`n"
. "Customer Name : " cname "`n"
. "Tire Size : " tiresize "`n"
. "Brand : " brand "`n" ;" " rims "`n"
. "VIN : " vin "`n"
IfMsgBox Cancel
{
ExitApp
}
IfMsgBox Yes
{
Break
}
IfMsgBox No
{
c := myRng.FindNext(c)
continue
}
I made this GUI:
Code: Select all
Gui, font
Gui, Add, Button, x27 y149 w88 h26 gyes, &Yes
Gui, Add, Button, x123 y149 w88 h26 gno, &No
Gui, Add, Button, x221 y149 w88 h26 gcancel, Cancel
Gui, Add, Text, x22 y19 h20 +Right, CUSTOMER NUMBER: %cnumber%
Gui, Add, Text, x22 y39 h20 +Right, CUSTOMER NAME: %cname%
Gui, Add, Text, x22 y59 h20 +Right, TIRE SIZE: %tiresize%
Gui, Add, Text, x22 y79 h20 +Right, BRAND: %brand%
Gui, Add, Text, x22 y99 h20 +Right, VIN: %vin%
Gui, font, s12 +bold ;+underline
Gui, Add, Text, x222 y29 w80 h22 +Center 0x1000, LOC
Gui, font, s%size%
Gui, Add, Text, x222 y50 w80 h30 +Center 0x1000, %loc%
; Generated using SmartGUI Creator for SciTE
Gui, Show, w327 h185, Customer Information
;~ return
No:
{
c := myRng.FindNext(c)
continue
}
yes:
{
break
}
Any idea what I'm missing?