Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to make a GUI which will run different sets of macros depending on which boxes i check. but i dont want them to run until i click a GO button. the help files mention that checkboxes can store their checked or unchecked state in a variable and have been trying to use an if statement to get them to run, im not getting any error messages anymore it just doesnt run. this is what it looks like so far:

Gui, Add, Checkbox, vKCPM, KCPM Gui, Add, Button, Default gButtonGo, Go Gui, Show, w500 h300, Products return

ButtonGo: if KCPM = 1 msgbox, kcpm checked return

GuiClose: Gui, Destroy

share|improve this question
    
Please could you edit your question to add the error messages? –  Clare Macrae Nov 2 '12 at 6:24

1 Answer 1

You are simply missing a Submit

Gui, Add, Checkbox, vKCPM, KCPM
Gui, Add, Button, Default gButtonGo, Go
Gui, Show, w500 h300, TestApp
Return

ButtonGo:
Gui, Submit, NoHide
If KCPM = 1
   msgbox, yes
else
    msgbox, no
Return

GuiClose:
Gui, Destroy
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.