Welsh Posted October 10, 2005 Share Posted October 10, 2005 hey, i got 2 radio buttons. im trying to put it so that if i select say slot1 that $x = 100 and $y = 200 and if you select slot 2 that $x = 300 and $y = 400. i think what ive done below is right but i have no clue. i remember some stuff about when i used vb like a year ago to make something for a project. im not sure what to put for when the radio button is selected right now i put true. thinking that if its no then its false but if it is then its true. below is the code ;the group with the 2 radio buttons GuiCtrlCreateGroup("Character Selection", 200, 55, 180, 140) $slot1 = GuiCtrlCreateRadio("Slot 1", 210, 75, 80, 20) $slot2 = GuiCtrlCreateRadio("Slot 2", 300, 75, 75, 20) ;the if...then statements(probally doesnt work) If $slot1 = true Then $x = 100, $y = 200 EndIf If $slot2 = true Then $x = 300, $y = 400 EndIf ;what i want the variables that changed to effect. MouseClick ("left", $x, $y, 1, 15) (does what i said above make any sense?) [center].: If I Ask A Question, Thanks For The Help! :.[/center][center].: Welsh :.[/center] Link to comment Share on other sites More sharing options...
Developers Jos Posted October 10, 2005 Developers Share Posted October 10, 2005 ;the if...then statements(probally doesnt work)If $slot1 = true Then $x = 100, $y = 200EndIfIf $slot2 = true Then $x = 300, $y = 400EndIf(does what i said above make any sense?)Use GUICtrlRead($Slot1) to retrieve if it is selected or not... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Valuater Posted October 10, 2005 Share Posted October 10, 2005 like this #include <GUIConstants.au3> Dim $x, $y ;the group with the 2 radio buttons GuiCtrlCreateGroup("Character Selection", 200, 55, 180, 140) $slot1 = GuiCtrlCreateRadio("Slot 1", 210, 75, 80, 20) $slot2 = GuiCtrlCreateRadio("Slot 2", 300, 75, 75, 20) ;the if...then statements(probally doesnt work) If GUICtrlRead($slot1, 1) = $GUI_CHECKED Then $x = 100 And $y = 200 If GUICtrlRead($slot2, 1) = $GUI_CHECKED Then $x = 300 And $y = 400 ;what i want the variables that changed to effect. MouseClick ("left", $x, $y, 1, 15) 8) Link to comment Share on other sites More sharing options...
Welsh Posted October 10, 2005 Author Share Posted October 10, 2005 like this#include <GUIConstants.au3> Dim $x, $y ;the group with the 2 radio buttons GuiCtrlCreateGroup("Character Selection", 200, 55, 180, 140) $slot1 = GuiCtrlCreateRadio("Slot 1", 210, 75, 80, 20) $slot2 = GuiCtrlCreateRadio("Slot 2", 300, 75, 75, 20) ;the if...then statements(probally doesnt work) If GUICtrlRead($slot1, 1) = $GUI_CHECKED Then $x = 100 And $y = 200 If GUICtrlRead($slot2, 1) = $GUI_CHECKED Then $x = 300 And $y = 400 ;what i want the variables that changed to effect. MouseClick ("left", $x, $y, 1, 15)8)thanks for the help, its grealty appreciated. [center].: If I Ask A Question, Thanks For The Help! :.[/center][center].: Welsh :.[/center] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now