Eyeon:Script/Reference/Libraries/eyeon/executebg

From VFXPedia

< Eyeon:Script | Reference | Libraries | eyeon
Revision as of 02:23, 1 March 2008 by Izyk (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Contents

Usage

executebg(string command, boolean wait )

  • command (required, string)

A string containing the command to be executed by the shell.

  • wait(optional, boolean)

A boolean option that will force Fusion to wait for a response from the OS. New for 5.02.


Returns

This function return true if it successfully submitted the command, false if it did not succeed.


Remarks

The eyeon.executebg function executes a command using the shell (operating system), but does not wait for the function to return (unless the wait argument is true).

Note that the return value does not actually reflect whether the command succeeded, it only indicates if the operating system was able to execute the command provided.


Requirements

  • eyeonScript 5.0


Examples

-- Connect to Fusion, starting it first if necessary
 
function StartFusion()
 local fusion = Fusion("127.0.0.1")
if not fusion then
  if executebg("C:/Program Files/*Fusion  5.Fusion.exe") then
   while fusion == nil do
    wait(1)
    fusion = Fusion("127.0.0.1")
   end
  else
   return nil
  end
 end
 
return fusion


Tips for executebg (edit)

EyeonTips:Script/Reference/Libraries/eyeon/executebg