Announcement

Collapse
No announcement yet.

MemoreEx: CreateProcess function

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

  • MemoreEx: CreateProcess function

    Apparently CreateProcess function is the function I call to capture the output of a cmd.exe call but it's not obvious to me how to get the output, anyone know?

  • #2
    Everything you running in CMD you getting export into a console, but you can also get export into a text file (then console will not show you anything, but you can start CMD as hidden process (because it will show nothing, it will show into a file), it will be exporting things into a text file that you will refreshing/opening into an AMS). Maybe you need something like that?

    You can also try to use "os.execute" LUA command for CMD. Even you are running a Batch code, you can also writte it into a LUA, run it and maybe get the return. I said maybe because im not sure what return you will get from os.execute, output, or some exit code.

    If you ask me to get CMD into an AMS, i used CMD output to text file for Batch softwares and logs, and i made AMS to check/load that file every second or something like that (like every time when CMD add new information). Batch is easy to learn (even some complexed things that you cant find anywhere) and you can make powerful things with Batch and AMS together, actualy anything, even some ways is a different then it should be, but the result will be the same for users.

    Comment


    • #3
      I got it working, using the hStdInput/hStdOutput/hStdError fields of the LPSTARTUPINFO structure to get the console details so no need for reading files :yes

      Comment


      • #4
        Originally posted by Shrek View Post
        I got it working, using the hStdInput/hStdOutput/hStdError fields of the LPSTARTUPINFO structure to get the console details so no need for reading files :yes
        Nice work
        Bas Groothedde
        Imagine Programming :: Blog

        AMS8 Plugins
        IMXLH Compiler

        Comment

        Working...
        X