MotorXP-AFM Scripting API
    Preparing search index...

    Variable MotorXPConst

    MotorXP: {
        appVersion(): version;
        include(path: string): any;
        readFile(path: string): string;
        require(name: string): Object;
        writeFile(path: string, content: string, append?: boolean): boolean;
    }

    Built-in MotorXP object implementing the global appVersion(), include(), require(), readFile(), and writeFile() functions.

    Type Declaration

    • appVersion: function
      • Same as appVersion.

        Returns version

        Object with major, minor, and build properties.

    • include: function
      • Same as include.

        Parameters

        • path: string

          Path to the script file.

        Returns any

        Result of executing the included file.

    • readFile: function
      • Same as readFile.

        Parameters

        • path: string

          Path to the file.

        Returns string

        File contents; an empty string on error.

    • require: function
      • Same as require.

        Parameters

        • name: string

          Path to the module file.

        Returns Object

        Data exported by the module.

    • writeFile: function
      • Same as writeFile.

        Parameters

        • path: string

          Path to the file.

        • content: string

          Contents.

        • Optionalappend: boolean

          Append to the file.

        Returns boolean

        True if writing succeeded.