If $CmdLine[0] = 0 Then $CmdLineRaw = '/File: "C:\File.txt" /Line: "Some_Line"'
_CmdLineSetEvent("File", "_Show_CmdLine_Proc", "Call #1")
_CmdLineSetEvent("Line", "_Show_CmdLine_Proc", "Call #2")
Func _Show_CmdLine_Proc($sArgument, $sParams)
Return MsgBox(64, $sParams, "Command Line: " & $sArgument)
EndFunc
Func _CmdLineSetEvent($sArguments, $sFuncName, $sParams="")
Local $sRegExp, $sArgs, $sRet
Local $iStripQuotes = 1, $sPar = "-/", $sVal = "=:"
$sPar = "[" & StringRegExpReplace($sPar, "([-^\\])", "\\\1") & "]"
$sVal = "[" & StringRegExpReplace($sVal, "([-^\\])", "\\\1") & " ]"
$sArguments = "\Q" & $sArguments & "\E"
$sRegExp = '(?i)^(?:|.*?\s)'&$sPar&$sArguments&$sVal&'+(?:$|'&$sPar&'|((?:"[^"]*"|[^"])+?)(?:$|\s'&$sPar&'\w)).*'
$sArgs = StringRegExpReplace($CmdLineRaw, $sRegExp, '\1')
If @extended = 0 Or $sArgs = "" Then Return SetError(1, 0, 0)
If $iStripQuotes Then $sArgs = StringRegExpReplace($sArgs, '\A"+|"+\z', '')
$sRet = Call($sFuncName, $sArgs, $sParams)
If @error Then $sRet = Call($sFuncName, $sArgs)
If @error Then Return SetError(2, 0, 0)
Return $sRet
EndFunc