Script Host Compatibility Mode

Extra! Basic Support

The following is a list of supported Extra! Basic Statements and Functions in BlueZone

 


Supported Extra! Basic Statements in BlueZone Script Host

AppActivate( BSTR )

Sets the keyboard focus to the specified window.

Title - The text contained in the window's caption area.


Assert( BOOL )

Generates an error if the specified condition is false.

Condition - Any expression that evaluates to true or false.


Beep( )

Produces a sound using the system's Default .wav file.


BeginDialog( VARIANT *, VARIANT, VARIANT, int, int, VARIANT )

Begins a dialog definition.

DialogID - Variant to receive dialog identifier.  Used in subsequent dialog statements.

xPos - Vertical position of dialog (optional).  If omitted then dialog is centered in screen.

yPos - Horizontal position of dialog (optional).  If omitted then dialog is centered in screen.

Width - Dialog width.

Height - Dialog height.

Caption - Dialog title to display in caption bar.


Button( int, int, int, int, BSTR, VARIANT * )

Creates a button in a dialog.

xPos - Vertical position of button.

yPos - Horizontal position of button.

Width - Button width.

Height - Button height.

Text - Button text.

ButtonID - Variant to set or receive button identifier (optional).


ButtonGroup( VARIANT * )

Begins a definition of buttons.

ButtonGroupID - Variant to receive the value of the button selected by user.


CancelButton( int, int, int, int, VARIANT * )

Creates a Cancel button in a dialog.

xPos - Vertical position of button.

yPos - Horizontal position of button.

Width - Button width.

Height - Button height.

ButtonID - Variant to set the button identifier (optional).

If ButtonID is omitted, then the ButtonGroupID variant is set to zero(0) when the Cancel button is selected by user.


Caption( BSTR )

Sets the title text of a dialog.

Title - The new dialog text to display in the dialog's caption area.


ChDir( BSTR )

Changes the current directory.

Newdir - The name of the new current directory.


ChDrive( BSTR )

Changes the current drive.

Newdrive - The name of the new current drive.


CheckBox( int, int, int, int, BSTR, VARIANT * )

Creates a checkbox control in a dialog.

xPos - Vertical position of checkbox.

yPos - Horizontal position of checkbox.

Width - Checkbox width.

Height - Checkbox height.

Text - Checkbox text.

CheckBoxID - Variant to set and receive checkbox state.


Close( VARIANT *, VARIANT *, VARIANT *, VARIANT * )

Closes file(s) previously opened with the Open statement.

FileNum1 - File number to close.

FileNum2 - File number to close (optional).

FileNum3 - File number to close (optional).

FileNum4 - File number to close (optional).


ComboBox( int, int, int, int, VARIANT *, VARIANT * )

Creates a combobox control in a dialog.

xPos - Vertical position of combobox.

yPos - Horizontal position of combobox.

Width - Combobox width.

Height - Combobox height.

List - Combobox text, each list item should be separated with a Tab character.

ComboboxID - Variant to set and receive current combobox selection.


Dialog( VARIANT * )

Creates and invokes a previously defined dialog.

DialogID - Variant used in a previous call to BeginDialog.


DlgEnable( int, VARIANT )

Enables or disables a dialog control.

ControlId - Identifier of the dialog control.

Mode - 0 to disable, or 1 to enable the dialog control (optional).

If Mode is omitted then the current mode of the dialog control is returned.


DlgFocus( VARIANT * )

Sets the keyboard focus to a dialog control.

ControlId - Identifier of the dialog control.


DlgListBoxArray( int, VARIANT * )

Fills a listbox or combobox list with items, or returns number of items.

ControlId - Identifier of the listbox or combobox control.

List - Listbox or combobox text (optional), each list item should be separated with a Tab character.

If List is omitted then the number of items is returned.


DlgSetPicture( int, BSTR )

Changes the current picture being displayed in a picture dialog control.

ControlId - Identifier of the picture control.

Name - File name of the new image to display.


DlgText( int, VARIANT * )

Changes the text of a dialog control, or returns the current text.

ControlId - Identifier of the dialog control.

Text - The new text of the dialog control (optional).

If Text is omitted then the current text is returned.


DlgValue( int, VARIANT * )

Changes the state of a dialog control, or returns current state.

ControlId - Identifier of the dialog control.

State - The new state of the dialog control (optional), the state value depends on the control Type:

   Checkbox

    1 Select the checkbox

    0 Clear the checkbox

   -1 Fill the checkbox with gray shading

   Option group

    0 Select the first option button

    1 Select the second option button

    2...Select the third option button and so forth

   Listbox or Combobox

    0 Select the first item

    1 Select the second item

    2...Select the third item and so forth

If State is omitted then the current State is returned.


DlgVisible( int, VARIANT * )

Sets or receives the visible state of a dialog control.

ControlId - Identifier of the dialog control.

VisibleState - (optional) 0 to hide the control, 1 to show the control.

Returns - The visible state of the dialog control when VisibleState is omitted.


DoEvents( )

Yields execution to Windows for processing operating system events.


DropComboBox( int, int, int, int, VARIANT *, VARIANT * )

Creates a Dropdown combobox control in a dialog.

xPos - Vertical position of combobox.

yPos - Horizontal position of combobox.

Width - Combobox width.

Height - Combobox height.

List - Combobox text, each list item should be separated with a Tab character.

ComboboxID - Variant to set and receive current combobox selection.


DropListBox( int, int, int, int, VARIANT *, VARIANT * )

Creates a Dropdown listbox control in a dialog.

xPos - Vertical position of listbox.

yPos - Horizontal position of listbox.

Width - Listbox width.

Height - Listbox height.

List - Listbox text, each list item should be separated with a Tab character.

ListboxID - Variant to set and receive current listbox selection.


EditBox( int, int, int, int, VARIANT * )

Creates an editbox control in a dialog.

xPos - Vertical position of editbox.

yPos - Horizontal position of editbox.

Width - Editbox width.

Height - Editbox height.

Text - Variant to set and receive the editbox text.


EndDialog( )

Ends a dialog definition.


FileCopy( BSTR, BSTR )

Copies the contents of one file to another.

SourceFile - The name of the source file.

DestinationFile - The name of the destination file.  If the file exists then it will be overwritten, if the file does not exist then a new file is created.


GoTo( BSTR )

return E_NOTIMPL;


GroupBox( int, int, int, int, BSTR, VARIANT * )

Creates a Groupbox control in a dialog.

xPos - Vertical position of groupbox.

yPos - Horizontal position of groupbox.

Width - Groupbox width.

Height - Groupbox height.

Text - Groupbox text.

GroupboxID - Variant to set or receive groupbox identifier (optional).


Input( BYTE, VARIANT *, VARIANT *, VARIANT *, VARIANT * )

Reads a line of data from a file and assigns each line read to a variable.

FileNum - The file number of the open file.

Variant1 - The variant name to receive the file data.

Variant2 - The variant name to receive the file data (optional).

Variant3 - The variant name to receive the file data (optional).

Variant4 - The variant name to receive the file data (optional).


Kill( BSTR )

Deletes files from disk.

Filespec - File specification of file(s) to delete.


Let(  )

Does nothing, included for compatability only.


LineInput( BYTE, VARIANT * )

Reads a line from a file into a variable.

FileNum - The file number of the previously opened file.

Variant - The variant name to receive the file data.


ListBox( int, int, int, int, VARIANT *, VARIANT * )

Creates a listbox control in a dialog.

xPos - Vertical position of listbox.

yPos - Horizontal position of listbox.

Width - Listbox width.

Height - Listbox height.

List - Listbox text, each list item should be separated with a Tab character.

ListboxID - Variant to set and receive current listbox selection.


Lock( BYTE, int, int, int )

return E_NOTIMPL;


LSet( BSTR *, BSTR )

Does nothing, included for compatability only.


MkDir( BSTR )

Creates a directory on disk.

DirectoryName - The name of the directory to create.


Name( BSTR, BSTR )

Renames a disk file.

OldName - The name of the existing file.

NewName - The new name of the file.


OkButton( int, int, int, int, VARIANT * )

Creates an OK button in a dialog.

xPos - Vertical position of button.

yPos - Horizontal position of button.

Width - Button width.

Height - Button height.

ButtonID - Variant to set the button identifier (optional).

If ButtonID is omitted, then the ButtonGroupID variant is set to negative-one

(-1) when the OK button is selected by user.


Open( BSTR, VARIANT *, BYTE, VARIANT * )

Opens a file for read, write, or append.

Filename - the name of the disk file.

Filemode - 0 or "Input" for Input, 1 or "Output" for Output, 2 or "Append" for Append.

FileNum - File number, used in subsequent file operations.

RecordLength - Record length (optional).

Returns - 0 for success, or error code.


OptionButton( int, int, int, int, BSTR, VARIANT * )

Creates an option button control in a dialog.

xPos - Vertical position of option button.

yPos - Horizontal position of option button.

Width - Option button width.

Height - Option button height.

Text - Option button text.

OptionbuttonID - Variant to set and receive option button state.


OptionGroup( VARIANT * )

Used in conjunction with OptionButton statements to set up a series of related options.  The OptionGroup statement also establishes the variant that will contain the user's selection.

OptionGroupID - Variant to receive the user's selection.


Picture( int, int, VARIANT, VARIANT, BSTR, VARIANT, VARIANT * )

Creates a picture control in a dialog.

xPos - Vertical position of picture.

yPos - Horizontal position of picture.

Width - Picture width (optional).

Height - Picture height (optional).

Type - not used (optional).

pictureID - Variant to set or receive picture identifier (optional).


Print( BYTE, VARIANT *, VARIANT *, VARIANT *, VARIANT * )

Writes line(s) of data to a file.

FileNum - The file number of the open file.

Variant1 - The variant name to set the file data.

Variant2 - The variant name to set the file data (optional).

Variant3 - The variant name to set the file data (optional).

Variant4 - The variant name to set the file data (optional).


PushButton( int, int, int, int, BSTR, VARIANT * )

Creates a button in a dialog.

xPos - Vertical position of button.

yPos - Horizontal position of button.

Width - Button width.

Height - Button height.

Text - Button text.

ButtonID - Variant to set or receive button identifier (optional).


RadioButton( int, int, int, int, BSTR, VARIANT * )

Creates a radiobutton control in a dialog.

xPos - Vertical position of radiobutton.

yPos - Horizontal position of radiobutton.

Width - Radiobutton width.

Height - Radiobutton height.

Text - Radiobutton text.

RadiobuttonID - Variant to set and receive radiobutton state.


Reset( )

Closes all opened disk files.


RmDir( BSTR )

Removes a directory.

DirectoryName - The name of the directory to remove.


Rset( BSTR *, BSTR )

Does nothing, included for compatability only.


Seek( BYTE, VARIANT * )

Sets the position within a file for the next read or write operation.

FileNum - The file number of the opened file.

Position - The position within the file to set the file pointer (optional).

Returns - The current file pointer position if Position is omitted.


SendKeys( BSTR, VARIANT )

return E_NOTIMPL;


SetAttr( BSTR, BYTE )

Sets the attributes for a file.

FileName - The name of the disk file.

Attributes - A number containing the new attributes of the file:

0    Normal file

1    Read-only file

2    Hidden file

4    System file

32   Archive file


StaticComboBox( int, int, int, int, VARIANT *, VARIANT * )

Creates a static combobox control in a dialog.

xPos - Vertical position of combobox.

yPos - Horizontal position of combobox.

Width - Combobox width.

Height - Combobox height.

List - Combobox text, each list item should be separated with a Tab character.

ComboboxID - Variant to set and receive current combobox selection.


Stop( )

Halts script execution.


Text( int, int, int, int, BSTR )

Creates a static text control in a dialog.

xPos - Vertical position of textbox.

yPos - Horizontal position of textbox.

Width - Textbox width.

Height - Textbox height.

Text - Variant to set and receive the textbox text.


TextBox( int, int, int, int, VARIANT * )

Creates a textbox control in a dialog.

xPos - Vertical position of textbox.

yPos - Horizontal position of textbox.

Width - Textbox width.

Height - Textbox height.

Text - Variant to set and receive the textbox text.


Unlock( BYTE, int, int, int )

return E_NOTIMPL;


Width( BYTE, BYTE )

return E_NOTIMPL;


Write( BYTE, VARIANT *, VARIANT *, VARIANT *, VARIANT * )

Writes data to a file.

FileNum - The file number of the open file.

Variant1 - The variant name to set the file data.

Variant2 - The variant name to set the file data (optional).

Variant3 - The variant name to set the file data (optional).

Variant4 - The variant name to set the file data (optional).

As the data is written to the file, Write inserts commas between items and places quotation marks around strings.  Write appends a newline character to the file after it has written the last character.


Supported Extra! Basic functions in BlueZone Script Host

Command( )

return E_NOTIMPL;


CurDir( BSTR )

Returns - the current default path for the specified drive.


CVar( VARIANT )

return E_NOTIMPL;


CVDate( VARIANT )

return E_NOTIMPL;


Dir( VARIANT *, VARIANT * )

Returns the first filename that matches the specified pattern.

Filespec - File specification.

Attributes - File attributes (optional):

0    returns normal files

2    returns normal and hidden files

4    returns normal and system files

8    returns the volume label

16   returns directory names

Values for Attributes can be added to specify files with multiple attributes.

For example, to return hidden and system files, in addition to normal files, set Attributes to 6 (2 + 4 = 6).  The default value for Attributes is 0.


DlgControlID( BSTR )

Given the dialog control text, returns a dialog control identifier.

Text - Dialog control text.


Environ( BSTR )

Returns a string from the operating system's environment list.


Eof( BYTE )

Returns negative-one(-1) if the End-of-File condition is true for the specified file.

FileNum - The file number of the opened file.


Erl( )

return E_NOTIMPL;


FileAttr( BYTE, BYTE )

Returns the operating system handle or the file mode of the opened file.

FileNum - The file number of the opened file.

Option - If a one(1) is specified then the file mode is returned, if a two(2) is specified then the file's operating system handle is returned.


FileDateTime( BSTR )

Returns a string indicating the date and time the specified file was last modified.

Filename - The name of the disk file.


FileLen( BSTR )

Returns a number indicating the size of the specified file.

Filename - The name of the disk file.


FreeFile( )

Returns the next valid, unused file number.


FV( int, int, int, int, BYTE )

return E_NOTIMPL;


GetAttr( BSTR )

Returns the attributes of the specified file, directory, or volume label.

Filename - The name of the disk file.

Returns - One or a combination of the following attribute values.

0    Normal file

1    Read-only file

2    Hidden file

4    System file

8    Volume label

16   Directory

32   Archive


GetField( BSTR, BYTE, BSTR )

Returns a substring from a source string.

Source - The source string.

Field - The field number.

Delimeter - The separator characters between fields.


IPmt( int, int, int, int, int, BYTE )

return E_NOTIMPL;


IRR( VARIANT, int )

return E_NOTIMPL;


Loc( BYTE )

Returns the current offset within the specified opened file.

FileNum - The file number of the opened file.


Lof( BYTE )

Returns the length of the opened file.

FileNum - The file number of the opened file.


NPV( int, VARIANT )

return E_NOTIMPL;


PasswordBox( BSTR, VARIANT *, VARIANT * )

Displays a dialog to the user and returns a password.

Prompt - The text used to prompt the user.

Title - The title of the dialog box contained in the caption area.

Default - The default password (optional).

Returns - The password entered by the user.


Pmt( int, int, int, int, BYTE )

return E_NOTIMPL;


PPmt( int, int, int, int, int, BYTE )

return E_NOTIMPL;


PV( int, int, int, int, BYTE )

return E_NOTIMPL;


Rate( int, int, int, int, BYTE, int )

return E_NOTIMPL;


SetField( BSTR, BYTE, BSTR, BSTR )

Returns a modified record string.

Source - The source record string.

Field - The field number to replace.

Newfield - The new string to put into field number.

Delimeter - The separator characters between fields.


Shell( BSTR, VARIANT * )

Executes a program.

Command - The command string to execute.

WindowStyle - Not used (optional).

Returns - The Task Id of the executed program.


Spc( int )

return E_NOTIMPL;


Tab( int )

return E_NOTIMPL;