flaxcrack Posted February 10, 2006 Author Posted February 10, 2006 Micha1405 said: i think you mean this or i don't understand you If $CMDLine[0] > 0 Then If $cmdline[1] = "/msg1" then ;Notice you are not putting a space between /msg and 1 MsgBox(0, "Test", "test1") ElseIf $cmdline[1] = "/msg2" then ;Notice you are not putting a space between /msg and 2 MsgBox(0, "Test", "test2") EndIf EndIf What I'm trying to do is pull the marked value of that is asigned to /msg via the user from the command line. Meaning that value for /msg argument could be 1000 not just 1 or 2. Think of it as the count size of the ping command. This would be your syntax: ping google.com -n 888. Now the user could make -n 1 if they wanted. Where I am lost is how to retrieve that value. [quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()
Valuater Posted February 10, 2006 Posted February 10, 2006 (edited) i have never done this ... but wouldn't it make sense to say ElseIf $cmdline[1] = "/msg2" then $Value = StringTrimLeft( $cmdline[1], 4) thus $value = 2 no????? 8) Edited February 10, 2006 by Valuater
flaxcrack Posted February 10, 2006 Author Posted February 10, 2006 Valuater said: i have never done this ... but wouldn't it make sense to say ElseIf $cmdline[1] = "/msg2" then $Value = StringTrimLeft( $cmdline[1], 4) thus $value = 2 no????? 8) DING DING DING! Not how I will format it but that is the concept. My problem was I couldn't get past the idea of the input comming from the command line by some other variable method when it was already there. Thanks for the help. [quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()
flaxcrack Posted February 10, 2006 Author Posted February 10, 2006 Valuater said: welcome8) Valuater thank you so much by the way. Here are some happy Emoticons just for you.... [quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()
Micha1405 Posted February 10, 2006 Posted February 10, 2006 Hi, if you only want do get the value you can use it like this cmda /msg5600 will display 5600 If $CMDLine[0] > 0 Then if StringInStr($cmdline[1],"/msg") Then $len=stringLen($cmdline[1]) $value=StringRight($cmdline[1],$Len-4) MsgBox(0,"",$value) EndIf EndIf My TrayToolBar
Valuater Posted February 10, 2006 Posted February 10, 2006 flaxcrack said: Valuater thank you so much by the way. Here are some happy Emoticons just for you.... lolthx8)
PeterG Posted February 22, 2010 Posted February 22, 2010 One thing I noticed about command line arguments. I am doing some simple monitoring, which will involve pinging a series of IP addresses. I can specify these on the command line. However, to loop through all the command line arguments, you have to skip the initial element, a[0], which is actually the size of the array. Interesting.
Developers Jos Posted February 22, 2010 Developers Posted February 22, 2010 On 2/22/2010 at 6:52 PM, 'PeterG said: One thing I noticed about command line arguments. I am doing some simple monitoring, which will involve pinging a series of IP addresses. I can specify these on the command line. However, to loop through all the command line arguments, you have to skip the initial element, a[0], which is actually the size of the array. Interesting. Interesting you find this interesting and decided to resurrect an 4 years old thread to share that thought with us. What's really interesting is that this is described in the Helpfile. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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