Jump to content

Recommended Posts

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

:o 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. :geek: 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()

Link to post
Share on other sites

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! :o 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()

Link to post
Share on other sites
  • 4 years later...

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.

Link to post
Share on other sites
  • Developers

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.
  :)

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...