Hello,
I have the script below for the command lines, but with the command line "-labo", the string is compared but is not recognised in the if, why???
Thanks a lot for your help!!!
I have the script below for the command lines, but with the command line "-labo", the string is compared but is not recognised in the if, why???
[ autoit ]
#include Local $arrayChangelog[4][2] = [[3,3],[0,"labowst"],[0,"labo"],[0,"new"]] Local $cmdlineb[5] $cmdlineb[0] = 2 $cmdlineb[1] = "-labo" $cmdlineb[2] = "/new" changelog($arrayChangelog) _ArrayDisplay($arrayChangelog) Func changelog(Byref $array) ; $arrayChangelog[4][2] = [[3,3],[0,"labowst"],[0,"labo"],[0,"new"]] = array example If $cmdlineb[0] > 0 Then For $i = 1 to $cmdlineb[0] For $j = 1 to $array[0][0] if $cmdlineb[$i] = "changelog" or $cmdlineb[$i] = "-changelog" or $cmdlineb[$i] = "/changelog" Then FileInstall("changelog.txt", @TempDir & "\changelog.txt", 1) ShellExecuteWait("notepad.exe", @TempDir & "\changelog.txt", "", "open") FileDelete(@TempDir & "\changelog.txt") Exit Endif _ErrorMsg($cmdlineb[$i] & @crlf & "-" & $array[$j][1]) if $cmdlineb[$i] = $array[$j][1] or $cmdlineb[$i] = "-" & $array[$j][1] or $cmdlineb[$i] = "/" & $array[$j][1] Then $array[$j][0] = 1 ElseIf $j = $array[0][0] Then _ErrorMsg('Parameter : "' & $cmdlineb[$i] & '" not found.', 1) Endif Next Next Endif EndFunc ;==>changelog Func _ErrorMsg($message, $exit = 0, $time = 0) MsgBox(48 + 262144, "Test" & " : Error!", $message, $time) If $exit Then Exit EndFunc ;==>_ErrorMsg
Thanks a lot for your help!!!