Core Function Run

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
UberFoX (Talk | contribs)
(Created page with "<pre> Run( <file>, <workdir>, <flag> ) </pre> === Description === Runs an external program. === Parameters === ==== file ==== The name of the executable (EXE, BAT, COM, or ...")
Newer edit →

Revision as of 10:25, 29 November 2011

Run( <file>, <workdir>, <flag> )

Contents

Description

Runs an external program.

Parameters

file

The name of the executable (EXE, BAT, COM, or PIF) to run.

workdir

Optional; The working directory.

flag

Optional; The "show" flag of the executed program:

@SW_HIDE = Hidden window
@SW_MINIMIZE = Minimized window
@SW_MAXIMIZE = Maximized window

Return Value

Success: The PID of the process that was launched.

Failure: 0.

Remarks

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.

Example

Run("Notepad.exe", "", @SW_MAXIMIZE);
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox