Sign in to follow this  
Followers 0
Edifice

Reacting to Checkboxes

3 posts in this topic

Func generatecolor()
    $color = "None"
    If GUICtrlread($check_color_black) = 1 Then
        $color = $color + "Black, "
    EndIf
    If GUICtrlread($check_color_blue) = 1 Then
        $color = $color + "Blue, "
    EndIf
    IF GUICtrlread($check_color_green) = 1 Then
        $color = $color + "Green, "
    EndIf
    If GUICtrlread($check_color_red) = 1 Then
        $color = $color + "Red, "
    EndIf
    IF GUICtrlread($check_color_silver) = 1 Then
        $color = $color + "Silver, "
    EndIf
    If GUICtrlread($check_color_yellow) = 1 Then
        $color = $color + "Yellow, "
    EndIf
    MsgBox(0, "Colors", $color)
EndFunc

All these $check_color_ - thingies are checkboxes.

Whenever I check one or more of the checkboxes off, All I get in my msgbox is a 0. If I don't check them off I get the declared value of the $color

I'm just wondering why, and was hoping one of you could explain that to me :)

Share this post


Link to post
Share on other sites



@Edifice

Youre using '+' for add strings in string, and its not a properly use, its only for numbers or something else...

Try '&' instead :)

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Ofcourse! - Thx

And thank you for being so overbearing with my stupidity :)

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  
Followers 0