webflight_sf25 Posted March 26, 2004 Posted March 26, 2004 Hi! I want a input to my script.exe like this one in batch "script.bat help" ********************** if %1 == "help" goto help goto cont :help echo. echo This file can.... echo. :cont ... ... ... end ********************** some one....
ezzetabi Posted March 26, 2004 Posted March 26, 2004 IfEqual,1,help,goto,help ;- Main program goes here Exit help: ;- Help section goes here Exit
webflight_sf25 Posted March 26, 2004 Author Posted March 26, 2004 Tnx a lot.. I tryed this one "IfEqual, 0, help, Goto, help" and its dont work "IfEqual, 1, help, Goto, help" This one works fine Tnx a lot..
Beastmaster Posted March 26, 2004 Posted March 26, 2004 (edited) The variable %0% returns the number of parameters which have been used on the commandline.Run, myscript.exe /1st /2nd /3rd, , Hidewill return %0% = 3Perfect to check if any or how much parameters have been used, especially if it's mandatory to set some.MyScript.autIfLess, 0, 1, SetEnv, Msg, Hey you! I've always told you to use a parameter ...IfEqual, 0, 2, SetEnv, Msg, Well -you've decided to a use a second param.\nCongratulations, you've won a trip to Iraq with George W. to search for weapons of mass distraction !IfEqual, 1, yeehaa, SetEnv, Msg, Hey Webflight_sf25.\nNice to meet you !MsgBox, 0, Webflight_sf25's - Parameter Detector, %Msg%\nNoParams: %0%Exit Edited March 26, 2004 by Beastmaster
Recommended Posts