Jump to content

GUI example needed


tzerber
 Share

Recommended Posts

Hi to all, i`m working on one old project that was 1 bat file, but i found AU3 and i rewrite it. My expirience with AU3 is not so good

so i need an example for this : 1 gui, 2 checkboxes and 2 buttons

1 button - if u press it to close the gui (i have this)

2 chekboxes that are linked to 2 functions (example ones, i`ll edit them later)

if u press the 2nd button to execute the functions depend on the checked chechboxes ( if the checkbox is checked to execute and if not - not to execute the function)

i made myself the gui and the buttons but i don`t know how to made it to read the checkboxes, so i need example

thanks :blink:

Edited by tzerber
Link to comment
Share on other sites

Hi to all, i`m working on one old project that was 1 bat file, but i found AU3 and i rewrite it. My expirience with AU3 is not so good

so i need an example for this : 1 gui, 2 checkboxes and 2 buttons

1 button - if u press it to close the gui (i have this)

2 chekboxes that are linked to 2 functions (example ones, i`ll edit them later)

if u press the 2nd button to execute the functions depend on the checked chechboxes ( if the checkbox is checked to execute and if not - not to execute the function)

i made myself the gui and the buttons but i don`t know how to made it to read the checkboxes, so i need example

thanks :blink:

An example straight from the help file... and it shows a checkbox too!

#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

Example()

Func Example()
    Local $n, $msg
    
    GUICreate("My GUI (GetControlState)")
    $n = GUICtrlCreateCheckbox("checkbox", 10, 10)
    GUICtrlSetState(-1, 1)  ; checked

    GUISetState()       ; will display an empty dialog box

    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

    MsgBox(0, "state", StringFormat("GUICtrlRead=%d\nGUICtrlGetState=%d", GUICtrlRead($n), GUICtrlGetState($n)))
EndFunc   ;==>Example
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...