Here's my version.
(Edited to a simplier version.)
loop
{
switch := %a_index%
if switch =
break
If switch = /h
msgbox, Command line parameter /h detected
If switch = /help
msgbox, Command line parameter /help detected
If switch = /hidden
msgbox, Command line parameter /hidden detected
}
Command line switches work in any order. Example:
scriptname /h
scriptname /h /hidden
scriptname /hidden /help /h