Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
List = StrCat("Red",@Tab,"Yellow",@Tab,"Brown",@Tab,"Black") A = AskItemList("Choose your Favorite Color",list,@tab,@sorted,@Single) Select A case Red Message("", a) break case Yellow Message("", a) break EndSelectSwitch never uses string constants. Using Switch @true to tells the switch statement to start checking each conditional case statements each condition. The trick is that each condition equates to an integer, 1 for true and 0 for false. A == "Red" actually is an integer. It is evaluated to @TRUE or @FALSE, which are integer values, 1 or 0 respectively. If you said switch @TRUE, then you get a match at the first case statement that evaluates to @TRUE.
List = StrCat("Red",@Tab,"Yellow",@Tab,"Brown",@Tab,"Black") A = AskItemList("Choose your Favorite Color",list,@tab,@sorted,@Single) Select @TRUE case A == "Red" Message("", a) break case A == "Yellow" Message("", a) break EndSelect>I am guessing that by using >the @true you are telling >winbatch to use a string >constant and that takes care >of the integer errror?
Article ID: W15955
File Created: 2010:06:21:08:40:32
Last Updated: 2010:06:21:08:40:32