Jump to content
Sign in to follow this  

Radio Button Checked

Recommended Posts


I want to know how i can execute a UDF the moment a radio button is pushed.

I am using select;case;endcase.... As there are minimal buttons, should i change it to on event?? If so how? I've never used on event before :)

Share this post

Link to post
Share on other sites

#include <GUIConstants.au3>

GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered

$Button_1 = GUICtrlCreateButton ("Run Notepad",  10, 30, 100)
$Button_2 = GUICtrlCreateButton ( "Button Test",  0, -1)

GUISetState ()      ; will display an  dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
        Case $msg = $GUI_EVENT_CLOSE
        Case $msg = $Button_1
            Run('Notepad.exe')    ; Will Run/Open Notepad
        Case $msg = $Button_2
            MsgBox(0, 'Testing', 'Button 2 was pressed')    ; Will demonstrate Button 2 being pressed
WendoÝ÷ Ûú®¢×ºËkzZqän̲hÇ­Ø^~éܶ*'Ê°j{m¡Æ¥b²Ù^Ø­b«y÷«­çm¢«¨µ®¢Öî¶Ú'²)ò¢êí¢në[ºÛhȧʫ²Ö­zg§´Z+E§b¡»­¶ìvazƦy«nÞ²è zË^v·©§2È£"¶ayû§rبƥ«¨µ
Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.