kor Posted April 2, 2011 Share Posted April 2, 2011 $hailfrom = "bulkcreatestaff" Switch $hailfrom Case "create" Or "delete" Or "move" Or "some" Or "other" Or "thing" consolewrite("1,create,delete,move,some,other,thing" & @CR) Case "bulkcreatestaff" Or "bulkdelete" Or "bulkmove" Or "bulksome" consolewrite("2,bulk,create,bulk,move,bulk,some" & @CR) EndSwitch Why is it, that if my var $hailfrom = "bulkcreatestaff" I am still seeing the first consolewrite instead of the second. What kind of pattern matching is being done here? Does the case check for any instance of "create" in the var? I always though it checked the entire value for an exact match. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 2, 2011 Developers Share Posted April 2, 2011 Or is not the proper syntax: $hailfrom = "bulkcreatestaff" Switch $hailfrom Case "create", "delete", "move", "some", "other", "thing" consolewrite("1,create,delete,move,some,other,thing" & @CR) Case "bulkcreatestaff", "bulkdelete", "bulkmove", "bulksome" consolewrite("2,bulk,create,bulk,move,bulk,some" & @CR) EndSwitch 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...
kor Posted April 2, 2011 Author Share Posted April 2, 2011 I appreciate it. Thanks. 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