Skip to content

Instantly share code, notes, and snippets.

@RaptorX
Created March 25, 2022 16:05
Show Gist options
  • Save RaptorX/b803168a40f56b06ccf54292566a734a to your computer and use it in GitHub Desktop.
Save RaptorX/b803168a40f56b06ccf54292566a734a to your computer and use it in GitHub Desktop.
Quick example of how to use Checkboxes and Radio buttons
gui add, edit, w100 vName
gui add, radio, vRBTitle, Mr.
gui add, radio,, Mrs.
gui add, radio,, Dr.
gui add, checkbox, vCBTrouble,Troubleshoot
gui add, checkbox, vCBCall,Call
gui add, button, w75 gShowVars, Create Message
gui show
return
ShowVars:
Gui submit, nohide
msg := ""
if (RBTitle = 1)
msg .= "Mr. "
else if (RBTitle = 2)
msg .= "Mrs. "
else if (RBTitle = 3)
msg .= "Dr. "
msg .= name
if (CBTrouble && CBCall)
msg := "We should call " msg " and help troubleshoot the computer"
else if (CBTrouble)
msg := "We should contact " msg " and help troubleshoot the computer"
else if (CBCall)
msg := "We should call " msg "."
msgbox % msg
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment