Fossil Rock Posted January 17, 2006 Posted January 17, 2006 Can't seem to get it to work, am I doing it right ? Select Case $1 = "Option A" ;do something Case $1 = "Option B" ;do something Case $1 = "Option C" Select Case $A = "Enabled" ;do something Case $A = "Disabled" ;do something EndSelect Case $1 = "Option H" ;do something EndSelect Agreement is not necessary - thinking for one's self is!
greenmachine Posted January 17, 2006 Posted January 17, 2006 I'm not sure about the nested Select statements, but I know you could change the nested one to If/ElseIf/Else/EndIf and it would work.
Oxin8 Posted January 17, 2006 Posted January 17, 2006 A switch statement would probably be better in that case. I don't know why it wouldn't be working though. Maybe the problem is elsewhere in the code. Switch $1 Case "Option A" ;do something Case "Option B" ;do something Case "Option C" Switch $A Case "Enabled" ;do something Case "Disabled" ;do something EndSelect Case "Option H" ;do something EndSelect ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus
MHz Posted January 17, 2006 Posted January 17, 2006 Can't seem to get it to work, am I doing it right ?Looks like logical code. Select Case can be nested. The problem could be the code that is setting the conditions before this Select Case is executed. A switch statement would probably be better in that case. I don't know why it wouldn't be working though. Maybe the problem is elsewhere in the code. Switch $1 Case "Option A" ;do something Case "Option B" ;do something Case "Option C" Switch $A Case "Enabled" ;do something Case "Disabled" ;do something EndSelect Case "Option H" ;do something EndSelectSwitch is AutoIt Beta only. You cannot close a Switch statement with EndSelect. You need to use EndSwitch.
Oxin8 Posted January 17, 2006 Posted January 17, 2006 *cough* Yea... just editted it and forgot to change the Ends... And I didn't know that Switch was Beta only. Good to know. Thx ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus
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