Sign in to follow this  
Followers 0
Welsh

If....Then Help

4 posts in this topic

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]

Share this post


Link to post
Share on other sites



;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

(does what i said above make any sense?)

Use GUICtrlRead($Slot1) to retrieve if it is selected or not...

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

Share this post


Link to post
Share on other sites

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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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]

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