Not sure if it's perfect, but it seems to work fine (improvements are always welcome though):
; process command line parameters getParams: Loop, %0% ; for each parameter { param := %A_Index% ; check for switches StringLeft, paramType, param, 1 If paramType = - ; switch indicator { ; determine type of switch StringMid, switch, param, 2, 1 ; settings file switch If switch = s { ; access value (= next parameter) param = % A_Index + 1 file_settings := %param% MsgBox, settings file:`n%file_settings% } } } ReturnThis script checks whether there are any parameters at all, then goes on to check whether a parameter is a switch (i.e. starting with a minus char - this can easily be modified to check for slashes though) and retrieves the accompanying value (in this case, the desired settings file).