ricky Posted May 8, 2013 Posted May 8, 2013 (edited) 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??? expandcollapse popup#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!!! Edited May 8, 2013 by ricky03
FireFox Posted May 8, 2013 Posted May 8, 2013 Hi, Can you post the working script and add [sOLVED] to your topic title? Not that it will help me, but I'm not the only one here. Br, FireFox.
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