Jump to content
Sign in to follow this  
tzerber

GUI example needed

Recommended Posts

tzerber

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

Share this post


Link to post
Share on other sites
Reaper HGN

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

Share this post


Link to post
Share on other sites
somdcomputerguy

There's an example here, GUICtrlGetState.

;) well i guess if you hear something twice.. :blink:

Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
tzerber

i`m stupid :blink:

thanks to all <3 luv ya

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  

×