Jump to content
Sign in to follow this  
d4rk

Event on Check Box

Recommended Posts

d4rk

2, i have this code to create check box

$Copy = GUICtrlCreateCheckbox("click me", 12, 100, 203, 20)

are there any way to show a msgbox() when the box is checked and opposite ?

thx


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
Drew

Here's a function I wrote for a old old program of mine.

It uses what your asking, should help.

Func Box()
    If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
        MouseClick( "left", 580, 460, 1, 0)
        MouseClick( "left", 470, 155, 2, 0)
            Sleep( 150 )
        Send( $input & "-" &$x)
            Sleep( 25 )
        Send( "{TAB}")
            Sleep( 25 )
        Send( "" &$x)
        $x = $x + 1
        Send("{ENTER}")
    Else
    MouseClick( "left", 580, 460, 1, 0)
    MouseClick( "left", 470, 155, 2, 0)
        Sleep( 150 )
    Send( $input & "-" &$x)
    $x = $x + 1
    Send( "{ENTER}")
    EndIf
EndFunc

Mostly pay attention to this:

If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then

Edited by Drew

Share this post


Link to post
Share on other sites
d4rk

Thanks, i'm getting started with GUI


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
Drew

np. If you need any help , or for me to explain that let me know.

Share this post


Link to post
Share on other sites
martin

2, i have this code to create check box

$Copy = GUICtrlCreateCheckbox("click me", 12, 100, 203, 20)

are there any way to show a msgbox() when the box is checked and opposite ?

thx

If you just want a msgbox when th echeckbox is clicked it's very easy-

#include <GUIConstantsEx.au3>


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

    $checkCN = GUICtrlCreateCheckbox("CHECKBOX 1", 10, 10, 120, 20)

    GUISetState()     ; will display an  dialog box with 1 checkbox

   ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        If $msg = $checkCN Then MsgBox(0,'detected','changed chechkbox')
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
d4rk

:)

Thanks for you all


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
Info

HA!

MINE'S THE EASIEST! :)

Edited by Info

Share this post


Link to post
Share on other sites
d4rk

yes, but with a ()

Case $msg = $Checkbox
If GUICtrlRead ($Checkbox) = $GUI_CHECKED Then
MsgBox(0,"YAY","Checkbox is checked!")
Else
MsgBox(0,"Awww...","Not checked...")
EndIf

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

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.