Jump to content

myfile.exe -k, command line


DCCD
 Share

Recommended Posts

Hi,

Is it possible to do this :)

Very simple example:

MsgBox(0, "AutoIt Example", "Hello!")
MsgBox(0, "AutoIt Example", "Bye!")

i wanna start it just like "svchost.exe"

\WINDOWS\System32\svchost.exe -k HTTPFilter
\WINDOWS\system32\svchost.exe -k NetworkService

Use StartRun and type cmd

myfile.exe -k or something like that to see msgbox "Bye!"

and

myfile.exe -n to see msgbox "Hello!"

Edited by DCCD
Link to comment
Share on other sites

  • Moderators

Hi,

Is it possible to do this :)

Very simple example:

MsgBox(0, "AutoIt Example", "Hello!")
MsgBox(0, "AutoIt Example", "Bye!")

i wanna start it just like "svchost.exe"

\WINDOWS\System32\svchost.exe -k HTTPFilter
\WINDOWS\system32\svchost.exe -k NetworkService

Use StartRun and type cmd

myfile.exe -k or something like that to see msgbox "Bye!"

and

myfile.exe -n to see msgbox "Hello!"

Check out $cmdline in the help file.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Negative :)

Of course it is... you explained yourself so well on what you wanted... I should have known... What I meant to say... "Look at $cmdline in the help file". Sorry for the confusion... you're one word response helped so much.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Anyway smoke, i don't have $cmdline in the help topic

P.S. : im NOT using beta.

So when you open your help file, go to the search tab, type in $cmdline... you get nothing ? :)

Edit:

Let's make this easy for everyone.

http://www.autoitscript.com/autoit3/docs/intro/running.htm

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

AutoIt v3.2.10.0

Start/All Programs/AutoIt v3/AutoIt Help File >_<

And guess what :) i got this

post-30451-1221428634_thumb.jpg

You are failing to follow instructions... I said "Click on the """"Search""""" Tab and type it in. You're in the "Index" tab.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Oh, i see now

just say "Running Scripts" in the help file! >_<

maybe you can help, Now explain this to me How make it work? give me example! Please :)

I provided you an online link yesterday directly to the page I showed you. But you insisted on debating. Clearly showing your lack of initiative in finding things for yourself.

I used the search engine to provide you with several hundred examples:

http://www.autoitscript.com/forum/index.ph...3Bcmdline\

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

finally :)

file.exe -h Msgbox: Hello!

file.exe -u Msgbox: Bye!

If $cmdline[0] > 0 Then
    Switch $cmdline[1]
        Case "-h", "/h"
            MsgBox(0, "using -h", "Hello!")
        Case "-u", "/u"
            MsgBox(4096, "using -u", "Bye!", 10)
        Case Else
            ConsoleWrite(" - - - Help - - - " & @crlf)
            ConsoleWrite("  -h : msgbox says Hello!" & @crlf)
            ConsoleWrite("  -u : msgbox says Bye!" & @crlf)
            ConsoleWrite(" - - - - - - - - " & @crlf)
        EndSwitch
    EndIf
Exit
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...