Hey everyone. I am getting an annoying duplicate variable error when there is not a duplicate variable. Can anyone help me out with this?
Code:
SetTimer, CBN, 50
MsgBox, 4131, New Request, Which request would you like to fill out?
CBN:
IfWinNotExist, New Request
Return
ControlSetText, Button1, &VOICE
ControlSetText, Button2, &PLS
IfMsgBox, Yes ; VOICE
REQUEST = VOICE
IfMsgBox, No ; PLS
REQUEST = PLS
Gui, Font, w700
Gui, Add, GroupBox, x11 y4 w280 h180 , Customer
Gui, Font, w400
Gui, Add, Text, x21 y24 w40 h20 , Name
Gui, Add, Edit, x21 y44 w260 h20 vCNAME,
Gui, Add, Text, x21 y74 w110 h20 , Account Number
Gui, Add, Edit, x21 y94 w260 h20 vCNUM, 2
Gui, Add, Text, x21 y124 w80 h20 , Product Line
Gui, Add, DropDownList, x21 y144 w150 h10 vPRODLN, 3
Gui, Add, Text, x181 y124 w50 h20 , Version
Gui, Add, DropDownList, x181 y144 w100 h20 vVERS, 4
Gui, Font, w700
Gui, Add, GroupBox, x11 y194 w280 h180 , Partner
Gui, Font, w400
Gui, Add, Text, x21 y214 w40 h20 , Name
Gui, Add, Edit, x21 y234 w260 h20 vPNAME, 5
Gui, Add, Text, x21 y264 w110 h20 , Account Number
Gui, Add, Edit, x21 y284 w260 h20 vPNUM, 6
Gui, Add, Text, x21 y314 w60 h20 , Location
Gui, Add, Edit, x21 y334 w260 h20 vLOC, 7
Gui, Font, w700
Gui, Add, GroupBox, x301 y4 w280 h180 , VSA
Gui, Font, w400
Gui, Add, Text, x311 y24 w160 h20 , Service Request Number
Gui, Add, Edit, x311 y44 w260 h20 vSRNUM, 8
Gui, Add, Text, x311 y74 w100 h20 , Order Number
Gui, Add, Edit, x311 y94 w260 h20 vORDNUM, 9
Gui, Add, Text, x311 y124 w80 h20 , Order Total
Gui, Add, Edit, x311 y144 w260 h20 vORDTOT, 10
Gui, Font, w700
Gui, Add, GroupBox, x301 y194 w280 h180 , Steps
Gui, Font, w400
Gui, Add, Text, x311 y214 w260 h20 , Steps taken to research the inquiry/order:
Gui, Add, Edit, x311 y234 w260 h50 vSTEPS, 11
Gui, Add, Text, x311 y294 w260 h20 , Detailed description of the issue:
Gui, Add, Edit, x311 y314 w260 h50 vDESC, 12
Gui, Add, Button, x21 y384 w100 h30 , 13
Gui, Add, Button, x171 y384 w100 h30 , 14
Gui, Add, Button, x321 y384 w100 h30 , 15
Gui, Add, Button, x471 y384 w100 h30 , Submit
Gui, Show, w598 h428, VOICE/PLS Request
Return
GuiClose:
ExitApp
The issue seems to be isolated to the timer up top to change the button names. When I take that part out, it works perfect. What's going on here? I have tried to change my variable name (CNAME) to something else, but this does not do it. I have also tried to change the "ControlSetText" line to change buttons "Yes" and "No" instead of "Button1(2)." I am so frustrated with troubleshooting it, I had to post it all up. Sorry for the length, and thank you for any replies.