AutoIt Run

Aus expecco Wiki (Version 2.x)
Version vom 14. Juli 2017, 21:55 Uhr von Mawalch (Diskussion | Beiträge)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

Schema[Bearbeiten]

AutoIt Run.png

Description[Bearbeiten]

Runs an external program. Fails in case the program is not found or can not be started.

Input Pins[Bearbeiten]

  • AutoItHandle
    The handle to the AutoIt server
  • Filename
    The name of the executable (EXE, BAT, COM, or PIF) to run.

Notes[Bearbeiten]

To run DOS (console) commands, try Run(@ComSpec & " /c " & 'commandName', "", @SW_HIDE) ; don't forget " " before "/c".

After running the requested program the script continues. To pause execution of the script until the spawned program has finished use the RunWait function instead. Providing the Standard I/O parameter with the proper values permits interaction with the child process through the StderrRead, StdinWrite and StdoutRead functions. Combine the flag values (or use $STDERR_CHILD, $STDIN_CHILD & $STDOUT_CHILD, defined in Constants.au3) to manage more than one stream. In order for the streams to close, the following conditions must be met:

  1. ) The child process has closed it's end of the stream (this happens when the child closes).
  2. ) AutoIt must read any captured streams until there is no more data.
  3. ) If STDIN is provided for the child, StdinWrite() must be called to close the stream.

Once all streams are detected as no longer needed, all internal resources will automatically be freed. StdioClose can be used to force the STDIO streams closed.

Revisions[Bearbeiten]

This block is in the AutoIt Library since 1.0.



Back to AutoIt Library.
Previous: AutoIt [ Option ]
Next: AutoIt [ Connect ]




Copyright © 2014-2024 eXept Software AG