Announcement

Collapse
No announcement yet.

Command line inside AMS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Command line inside AMS

    Hi everyone, i have a little question for this time.


    Y need to run a specific instructions in CMD on windows.
    But, i want to all process get showed on the window i mean:

    cd..
    make dir
    cls


    and that instructtions get showed inside of the ams project,

    I know how run an external cmd and bat, BUT I DONT WANT IT, i would like show proces INSIDE the window.
    Thanks a lot.

  • #2
    I'm not sure if this is what you are after, but a excellent example by BioHazard
    Pipe Command Line Output into AMS.apz

    Comment


    • #3
      Originally posted by colc View Post
      I'm not sure if this is what you are after, but a excellent example by BioHazard
      [ATTACH]n307102[/ATTACH]
      I have used it before, the number of commands is very limited

      Comment


      • #4
        instead of wasting time in these useless comments
        you could have used it to add some of them

        Comment


        • #5
          Originally posted by herrin View Post
          instead of wasting time in these useless comments
          you could have used it to add some of them
          How dear?!!!!!

          Comment


          • #6
            use
            os.execute ( "command" )

            Comment


            • #7
              Originally posted by startup View Post
              use
              os.execute ( "command" )
              using this how would you show the output into , say an input, or paragraph ?

              Comment


              • #8
                So Easy
                PHP Code:
                command "dir c:\"
                n = os.tmpname ()
                command = """ 
                ..command.. "\>""
                os.execute (command .. n)
                output = ""
                for line in io.lines (n) do
                output = output.."
                \r\n"..line
                end
                Dialog.Message("
                Startup Notice", output);
                os.remove (n) 

                Comment


                • #9
                  Originally posted by startup View Post
                  So Easy
                  PHP Code:
                  command "dir c:"
                  os.tmpname ()
                  command """ ..command.. "\>""
                  os.execute (command .. n)
                  output ""
                  for line in io.lines (n) do
                  output output.."\r\n"..line
                  end
                  Dialog
                  .Message("Startup Notice"output);
                  os.remove (n
                  things are only easy if you know them... I know nothing and nowt is easy.

                  I have copied your script but I must be doing something wrong because I just get errors.

                  First, most of the text is coloured pink as if it needs a " to finish things of or there is one too many.. I don't know.

                  I get ....... line=1 unfinished string near "dir c:"

                  any idea what I am doing wrong ?



                  Comment


                  • #10
                    I got this to work

                    Code:
                    command = "dir c:\ >"
                    n = os.tmpname ()
                    command = "" ..command .. "\>"
                    os.execute (command .. n)
                    output = ""
                    for line in io.lines (n) do
                    output = output.."\r\n"..line
                    end
                    Dialog.Message("Startup Notice", output);
                    os.remove (n)

                    Comment


                    • #11
                      other way


                      Click image for larger version

Name:	screen.PNG
Views:	228
Size:	30.2 KB
ID:	307141

                      [ATTACH]n307139[/ATTACH]
                      [ATTACH]n307140[/ATTACH]

                      Comment

                      Working...
                      X