On this Page

    _os (Operating System Functions)

    These functions access certain operating system features.

    Functions

    _os.exit(rc)Exit program immediately with this return code value.
    _os.getClipboard()

    (As of 3.1.002.07) Fetch the text from clipboard.

    _os.getCurDir()

    Fetch the program's current working directory name.

    _os.getenv(name)Fetch the value of environment variable name.
    _os.getMergeVersion()

    Fetch version of Merge that is running, e.g. "3.0.005.07".
    Prior to 3.1.002.04, this was available in only Merge.
    As of 3.1.002.04, any script-supporting process can use this function to get its version string. Also, the synonym function name _os.getVersion() was introduced.

    _os.getpid()

    (As of 3.0.003.19) Get the operating system's process identifier for the running process. This can be useful in coming up with unique identifiers/file names since process ids don't get reused quickly — often not until a reboot occurs.

    _os.getHostname()

    (As of 3.2.001.04) Fetch the hostname.

    _os.getProgramPath()Fetch the full path and filename of the currently executing program.
    _os.getustr()

    (As of 3.0.003.19) Get a fairly short unique string, based on time to the millisecond. The string uses only those characters that are allowed in file names.

    _os.setClipboard(text)

    (As of 3.1.002.07) Set text to clipboard.

    _os.setCurDir(newdir)Change the program's current working directory.
    _os.sleep(millisecs)

    Pause execution for millisecs milliseconds.

    _os.typeReturns either "Windows" or "Unix" as applicable.
    _os.userNameReturns the login id of the user running the DocOrigin application. Note that this could be a network user, a services user, a web server user, ... not necessarily the human user who clicked a mouse or hit enter.