BreCalmor Posted November 1, 2010 Posted November 1, 2010 Is there something in AutoIt like the VB function: Choose(index, choice-1[, choice-2, ... [, choice-n]]) Thanks, Bre
JoHanatCent Posted November 1, 2010 Posted November 1, 2010 Plenty. All depends what it is that you want to accomplish. Local $Binne[7] = ["Su", "Mon", "Tue", "We", "Th", "Fr", "Sa"] For $s = 1 To 7 MsgBox(64, "Index no: " & $s, " Inside of $Binne [" & $s - 1 & "] is ===> " & $Binne[$s - 1], .5); array starts @ 0 Next
C45Y Posted November 1, 2010 Posted November 1, 2010 Switch <expression> Case <value> [To <value>] [,<value> [To <value>] ...] statement1 ... [Case <value> [To <value>] [,<value> [To <value>] ...] statement2 ...] [Case Else statementN ...] EndSwitchParameters<expression> An expression that returns a value. The value from the expression is then compared against the values of each case until a match is found. This expression is always evaluted exactly once each time through the structure. <value> To <value> The case is executed if the expression is between the two values. <value> The case is executed if the expression matches the value. RemarksIf no cases match the Switch value, then the Case Else section, if present, is executed. If no cases match and Case Else is not defined, then none of the code inside the Switch structure, other than the condition, will be executed.Switch statements may be nested.Taken straight from the help file. hope its helpful http://twentylinesofcode.blogspot.comLittle apps n crap. can be fun
BreCalmor Posted November 1, 2010 Author Posted November 1, 2010 Trying to do a function (If...Next, Switch, or Select) in-line in another function. Since I didn't see a Choose function, I just used a Select. I would like to clean up the code, but I guess a Choose or IIF type function isn't out there. Thanks for the ideas, Bre
keilamym Posted November 29, 2010 Posted November 29, 2010 you can use multiple if statements.. hers a rough example if $var1 = "0" then blah blah blah if $var2 = "1" then blah blach endif endif
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