kor Posted April 2, 2011 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.
Developers Jos Posted April 2, 2011 Developers 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.
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