MaxIDE Project Object API



Identification

MaxIDE.Project

Description

This object is part of every project and extends capabilities of the IDE. It also has a simple library of common functions.

Functions

Nor (Exp1, Exp2) Variant

Parameters

Exp1

The first expression.

 

Exp2

The second expression.

Description

Performs the Nor operator on two expressions.

Switches ()

Description

Returns the command line argument string that was used to start MaxIDE, often called command line switches.

Finish ()

Description

Invoking this causes the project to end properly among the IDE.

GetMachineName ()

Description

Returns the computer name of the current system the script is running on.

Evaluate (Expression, [StopOnError]) Variant

Parameters

Expression String

A strand of code to be evaluated.

 

[StopOnError] Boolean = True

Determines whether to stop the project if the provided Expression errors.

Description

Evaluates an expression using the correct script language.

Execute (Statement, [StopOnError]) Variant

Parameters

Expression String

A strand of code that refers to a statement to be executed.

 

[StopOnError] Boolean = True

Determines whether to stop the project if the provided Statement errors.

Description

Executes a statement using the correct script language.

SetTimeout (Statement, Milliseconds, [StopOnError])

Parameters

Statement String

Specifies a statement to execute using the current script language.

 

Milliseconds Long

Specifies the number of milliseconds to time out upon.

 

[StopOnError] Boolean = True

Determines whether to stop the project if the provided Statement errors.

Description

Sets a statement to be executed upon a timeout determined by milliseconds. Specifying a blank statement or zero milliseconds cancels the timer.

SetInterval (Statement, Milliseconds, [StopOnError])

Parameters

Statement String

Specifies a statement to execute using the current script language.

 

Milliseconds Long

Specifies the number of milliseconds to time out upon.

 

[StopOnError] Boolean = True

Determines whether to stop the project if the provided Statement errors.

Description

Sets a statement to be executed upon an interval determined by milliseconds. Specifying a blank statement or zero milliseconds cancels the timer.

DoTasks ()

Description

A hybrid version of DoEvents, with wait/yield event balance processing. You can directly use DoEvents from your projects as the call for this function.

Guid () String

Description

Returns a newly generated Globally Unique Identifier.

Alert (Text) Variant

Parameters

Text Variant

Specifies the message to popup.

Description

An extension to the access MsgBox, you can use Alert or MsgBox directly from your project to invoke default.

Path ([VarPath]) String

Parameters

[VarPath] String

Specifies some form of path or path variables to be passed and considered in the return value.

Description

Returns the current application path and/or builds a path based upon the VarPath given.

VarPath (inPath) String

Parameters

inPath String

Specifies path variables to be fully qualified in the return value.

Description

Returns paths based on the variables passed to it. The following variables are recognized: %appfolder% %favoritesfolder% %wintempfolder% %systemfolder% %windowsfolder% %activeappfolder% %graphicsfolder% %tempfolder% %templatesfolder% %projectfolder% %helpfolder% %backupfolder%

ReadTextFile (FileName) String

Parameters

FileName String

Specifies the name of the file to read.

Description

Returns contents of a text file.

WriteTextFile (FileName, Text)

Parameters

FileName String

Specifies the name of the file to write.

 

Text String

Specifies the contents to write the file.

Description

Saves text contents to a file.

PathExists (FileName, [IsFile]) Boolean

Parameters

FileName String

Specifies the file or folder name to check existence of.

 

[IsFile] Boolean = False

This invokes strict checking such that a folder or a file isn't confused for each other.

Description

Checks the existence of a specified path and returns a Boolean as the result.

GetFilePath (URL) String

Parameters

URL String

Specifies a URL to be used to get the result from.

Description

Returns the file path portion of any URL. May include the file and extension information.

GetFileTitle (URL) String

Parameters

URL String

Specifies a URL to be used to get the result from.

Description

Returns the file title portion of any URL. Doesn't include path or extension information.

GetFileName (URL) String

Parameters

URL String

Specifies a URL to be used to get the result from.

Description

Returns the file name portion of any URL. Includes extension information, but not full path.

GetFileExt (URL, Lower, RemoveDot) String

Parameters

URL String

Specifies a URL to be used to get the result from.

 

Lower Boolean

Specifies whether the result should be in lower case.

 

RemoveDot Boolean

Specifies whether the period should be stripped from the result.

Description

Returns the file extension portion of any URL.

GetFileDate (URL) String

Parameters

URL String

Specifies a URL to be used to get the result from.

Description

Returns the file date of a local URL such as your typical directory path.

GetFileSize (URL) Long

Parameters

URL String

Specifies a URL to be used to get the result from.

Description

Returns the file size of a local URL such as a typical file.

TrimStrip (TheStr, TheChar) String

Parameters

TheStr String

Specifies a string to strip the left and right characters of.

 

TheChar String

Specifies a string to match as the string to be trimmed from TheStr.

Description

Takes a string and like trim, removes character from the left and right side, but only if they match the provided char. For instance providing a space as TheChar is the same as using Trim().

NextArg (TheParams, TheSeperator) String

Parameters

TheParams Variant

Specifies a list of parameters or arguments in string format. Modifications to this string persist.

 

TheSeperator String

Specifies a string to check against as the parameter separator.

Description

Analyzes the string passed to it seeking any existence of the separator and splits the result returning the left half argument found and changing the remainder to the left over data even when it's zero's out in length. Results are trimmed of spaces. *For JScript, may use RemoveNextArg for VBScript.

RemoveArg (TheParams, TheSeperator) String

Parameters

TheParams Variant

Specifies a list of parameters or arguments in string format. Modifications to this string persist.

 

TheSeperator String

Specifies a string to check against as the parameter separator.

Description

Analyzes string passed to it seeking any existence of the separator and splits the result, returning the remainder parameters even when the left over data even when it's zero's out in length. Results are trimmed of spaces. *For JScript, may use RemoveNextArg for VBScript.

RemoveNextArg (TheParams, TheSeperator) String

Parameters

TheParams Variant

Specifies a list of parameters or arguments in string format. Modifications to this string persist.

 

TheSeperator String

Specifies a string to check against as the parameter separator.

Description

Modifies the string passed to it seeking any existence of the separator and splits the result returning the left half and changing the remainder to the left over data even when it's zero's out in length. Results are trimmed of spaces. *For VBScript, may use NextArg and RemoveArg for JScript.

IsAlphaNumeric (Text) Boolean

Parameters

Text Boolean

Specifies text to be checked against alpha-numeric.

Description

Checks whether the passed text is of alpha numerical value. Meaning any digit, letter, or period.

IsMissing (Argument) Boolean

Parameters

Argument Any

Any variable that relates to a parameter existing in the current function or sub procedure scope.

Description

Returns whether or not the argument has been supplied as one of parameters by the caller.

IsObject (Variable) Boolean

Parameters

Variable Any

Any variable that is to be check against whether it is an object or not.

Description

Returns whether or not the Variable supplied is an object or not.

Automation

Project:Exec ()

Description

Optional event that is called when the project is executed.