Sign in to follow this  
Followers 0
Gillboss

What wrong?

13 posts in this topic

#1 ·  Posted (edited)

this is the code:

GUICreate("aaaa", 540, 540, 100, 100)   
GUICtrlCreateGroup("bbbb", 10, 80, 210, 250)
$optEeNormal = GUICtrlCreateRadio("asd", 20, 100, 190, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
$optEePower = GUICtrlCreateRadio("dsa", 20, 120, 190, 20)
$optSinPoint = GUICtrlCreateRadio("asdasd", 20, 140, 190, 20)
$optMulPoints = GUICtrlCreateRadio("dsadsa", 20, 160, 190, 20)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState()

why i get misstake? its something with the "GUICtrlSetState(-1, $GUI_CHECKED)".

and more thing, how can i know which radio the user checked?

Thanks!

Edited by Gillboss

Share this post


Link to post
Share on other sites



Whats the mistake?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

this is the code:

GUICreate("aaaa", 540, 540, 100, 100)   
GUICtrlCreateGroup("bbbb", 10, 80, 210, 250)
$optEeNormal = GUICtrlCreateRadio("asd", 20, 100, 190, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
$optEePower = GUICtrlCreateRadio("dsa", 20, 120, 190, 20)
$optSinPoint = GUICtrlCreateRadio("asdasd", 20, 140, 190, 20)
$optMulPoints = GUICtrlCreateRadio("dsadsa", 20, 160, 190, 20)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState()

why i get misstake? its something with the "GUICtrlSetState(-1, $GUI_CHECKED)".

and more thing, how can i know which radio the user checked?

Thanks!

Have you looked at the helpfile example for GUICtrlCreateRadio() ?

Both questions should be answered when you follow the example.

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Whats the mistake?

look:

Posted Image

Have you looked at the helpfile example for GUICtrlCreateRadio() ?

Both questions should be answered when you follow the example.

where it? Edited by Gillboss

Share this post


Link to post
Share on other sites

oh found so, this the code:

#include <GUIConstants.au3>
GUICreate("My GUI radio") ; will create a dialog box that when displayed is centered

$radio1 = GUICtrlCreateRadio ("Radio 1", 10, 10, 120, 20)
$radio2 = GUICtrlCreateRadio ("Radio 2", 10, 40, 120, 20)
GUICtrlSetState ($radio2, $GUI_CHECKED)

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

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED
            MsgBox(64, 'Info:', 'You clicked the Radio 1 and it is Checked.')
        Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED
            MsgBox(64, 'Info:', 'You clicked on Radio 2 and it is Checked.')
    EndSelect
Wend

so where to change and what to change in my project?

Share this post


Link to post
Share on other sites

here?

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

in my project have information too, no?

Edited by Gillboss

Share this post


Link to post
Share on other sites

No, it doesn't, you still need to study the example, if you don't get it then you shouldn't be on here.

Share this post


Link to post
Share on other sites

i realy dont know what wrong please somone tell me why..

Share this post


Link to post
Share on other sites

i realy dont know what wrong please somone tell me why..

The error you showed in post #4 was that a variable or constant was unknown. The $GUI_.. constants are defined in the include file GUICONSTANTS.AU3, so if you add the first line of the example to the first line of your script it should remove that error.

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

#13 ·  Posted (edited)

thank you thank you thank you :D:):D:):):):D:):D:):D:):D:):):):):)

Edited by Gillboss

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