4 Pascal Script Reference |
4.1 Device Management |
function AddAction( Caption, ProcName, DeviceName: string ): boolean |
function AddDevice( DeviceName, Description, GroupName, InheritedDeviceName: string ): boolean |
function AddDeviceGroup( GroupName, Description: string ): boolean |
function BlankCheckDevice: boolean |
function GetDevice( DeviceName: string; var DevBase: TDevice ): boolean |
procedure HideDeviceOrGroup( DeviceOrGroupName: string ) |
function ProgramDevice: boolean |
function ReadDevice: boolean |
procedure ShowDeviceOrGroup( DeviceOrGroupName: string ) |
function VerifyDevice: boolean |
|
4.1.1 AddAction |
function AddAction( Caption, ProcName, DeviceName: string ): boolean |
4.1.2 AddDevice |
function AddDevice( DeviceName, Description, GroupName, InheritedDeviceName: string ): boolean |
4.1.3 AddDeviceGroup |
function AddDeviceGroup( GroupName, Description: string ): boolean |
4.1.4 BlankCheckDevice |
function BlankCheckDevice: boolean |
4.1.5 GetDevice |
function GetDevice( DeviceName: string; var DevBase: TDevice ): boolean |
4.1.6 HideDeviceOrGroup |
procedure HideDeviceOrGroup( DeviceOrGroupName: string ) |
4.1.7 ProgramDevice |
function ProgramDevice: boolean |
4.1.8 ReadDevice |
function ReadDevice: boolean |
4.1.9 ShowDeviceOrGroup |
procedure ShowDeviceOrGroup( DeviceOrGroupName: string ) |
4.1.10 VerifyDevice |
function VerifyDevice: boolean |
|
4.2 File I/O |
function AddOpenFileAction( Caption, DeviceName, FileName: string ): boolean |
function OpenFile( FileName: string ): boolean |
4.2.1 AddOpenFileAction |
function AddOpenFileAction( Caption, DeviceName, FileName: string ): boolean |
4.2.2 OpenFile |
function OpenFile( FileName: string ): boolean |
4.3 Hex Editor |
function GetByteHexEdit( Offset: integer ): byte |
function GetSizeHexEdit: integer |
procedure RefreshHexEdit |
function SelectAllMemoryRange: boolean |
function SelectEEPROMRange: boolean |
procedure SetByteHexEdit( Offset: integer; Value: byte ) |
procedure SetProgramModifiedOnly( Value: boolean ) |
function SetProgramRange( StartVal, EndVal: integer ): boolean |
4.3.1 GetByteHexEdit |
function GetByteHexEdit( Offset: integer ): byte |
4.3.2 GetSizeHexEdit |
function GetSizeHexEdit: integer |
4.3.3 RefreshHexEdit |
procedure RefreshHexEdit |
4.3.4 SelectAllMemoryRange |
function SelectAllMemoryRange: boolean |
4.3.5 SelectEEPROMRange |
function SelectEEPROMRange: boolean |
4.3.6 SetByteHexEdit |
procedure SetByteHexEdit( Offset: integer; Value: byte ) |
4.3.7 SetProgramModifiedOnly |
procedure SetProgramModifiedOnly( Value: boolean ) |
4.3.8 SetProgramRange |
function SetProgramRange( StartVal, EndVal: integer ): boolean |
|
4.4 Message and Input Boxes |
procedure AddMsg( Text: string ) |
procedure ClearMsgs |
function InBox( Caption, EditLabel: string; var Value: string ): boolean |
function MsgBox( Text, Caption: string; Flags: integer ): integer |
4.4.1 AddMsg |
procedure AddMsg( Text: string ) |
4.4.2 ClearMsg |
procedure ClearMsgs; |
4.4.3 InBox |
function InBox( Caption, EditLabel: string; var Value: string ): boolean |
Displays a prompt in a dialog box, waits for the user to input text or click a button, and |
returns the contents of the text box to Value parameter. |
Parameters |
Caption: string |
string that contains the input box title |
EditLabel: string |
string that contains the edit control label |
Value: string |
Return Value |
If the user clicks OK or presses ENTER, the InBox function returns True and Value |
parameter, whatever is in the text box. If the user clicks Cancel, the function returns False. |
4.4.4 MsgBox |
function MsgBox( Text, Caption: string; Flags: integer ): integer |
The MsgBox function creates, displays, and operates a message box |
Parameters |
Text: string |
string that contains the message to be displayed |
Caption: string |
string that contains the dialog box title |
Flags: integer |
Specifies the contents and behavior of the dialog box. This parameter can be a combination of |
flags from the following groups of flags. To indicate the buttons displayed in the message |
box, specify one of the following values. |
MB_OK |
The message box contains one push button: OK. This is the default. |
MB_OKCANCEL |
The message box contains two push buttons: OK and Cancel. |
MB_ABORTRETRYIGNORE |
The message box contains three push buttons: Abort, Retry, and Ignore. |
|
MB_YESNOCANCEL |
The message box contains three push buttons: Yes, No, and Cancel |
MB_YESNO |
The message box contains two push buttons: Yes and No. |
MB_RETRYCANCEL |
The message box contains two push buttons: Retry and Cancel. |
To display an icon in the message box, specify one of the following values. |
MB_ICONHAND |
A stop-sign icon appears in the message box. |
MB_ICONQUESTION |
A question-mark icon appears in the message box. |
MB_ICONEXCLAMATION |
An exclamation-point icon appears in the message box. |
MB_ICONASTERISK |
An icon consisting of a lowercase letter i in a circle appears in the message box. |
MB_ICONWARNING |
An exclamation-point icon appears in the message box. |
MB_ICONERROR |
A stop-sign icon appears in the message box. |
MB_ICONINFORMATION |
An icon consisting of a lowercase letter i in a circle appears in the message box. |
MB_ICONSTOP |
A stop-sign icon appears in the message box. |
Return Value |
If the function fails, the return value is zero. |
If the function succeeds, the return value is one of the following menu-item values. |
IDABORT Abort button was selected. |
IDCANCEL Cancel button was selected. |
IDIGNORE Ignore button was selected. |
IDNO No button was selected. |
IDOK OK button was selected. |
IDRETRY Retry button was selected. |
IDYES Yes button was selected. |
4.5 Miscellaneous |
Application: TApplication |
InputForm: TForm |
|
function IntToHex( Value: Integer; Digits: Integer ): string |
procedure SetProductInfo( ProductName, Description: string ) |
4.5.1 Application |
Application: TApplication |
4.5.2 InputForm |
InputForm: TForm |
4.5.3 IntToHex |
function IntToHex( Value: Integer; Digits: Integer ): string |
4.5.4 SetProductInfo |
procedure SetProductInfo( ProductName, Description: string ) |
4.6 RemObjects Pascal Script |
Types |
Reserved words |
Statements |
Library |
|
4.6.1 Library |
function FloatToStr( e: extended ): string |
function IntToStr( i: Longint ): string |
function StrToInt( s: string ): Longint |
function StrToIntDef( s: string; def: Longint ): Longint |
function Copy( s: string; ifrom, icount: Longint ): string |
function Pos( substr, s: string ): Longint |
procedure Delete( var s: string; ifrom, icount: Longint ): string |
procedure Insert( s: string; var s2: string; ipos: Longint ): string |
function GetArraylength( var v: array ): Integer |
procedure SetArrayLength( var v: array; i: Integer ) |
function StrGet( S : String; I : Integer ) : Char |
function StrSet( c : Char; I : Integer; var s : String ) : Char |
function Uppercase( s : string ) : string |
function Lowercase( s : string ) : string |
function Trim( s : string ) : string |
function Length( s : String ) : Longint |
procedure SetLength( var S: String; L: Longint ) |
function Sin( e : Extended ) : Extended |
function Cos( e : Extended ) : Extended |
function Sqrt( e : Extended ) : Extended |
function Round( e : Extended ) : Longint |
function Trunc( e : Extended ) : Longint |
function Int( e : Extended ) : Longint |
function Pi : Extended |
function Abs( e : Extended ) : Extended |
function StrToFloat( s: string ): Extended |
function FloatToStr( e : Extended ) : String |
function Padl( s : string; I : longInt ) : string |
function Padr( s : string; I : longInt ) : string |
function Padz( s : string; I : longInt ) : string |
function Replicate( c : char; I : longInt ) : string |
function StringOfChar( c : char; I : longInt ) : string |
4.6.2 Reserved words |
AND |
ARRAY |
AS |
BEGIN |
CASE |
CHR |
CLASS |
CONST |
CONSTRUCTOR |
DESTRUCTOR |
DIV |
DO |
DOWNTO |
ELSE |
END |
EXCEPT |
EXIT |
EXPORT |
EXTERNAL |
|
FINALLY |
FOR |
FORWARD |
FUNCTION |
GOTO |
IF |
IMPLEMENTATION |
IN |
INHERITED |
INTERFACE |
IS |
LABEL |
MOD |
NIL |
NOT |
OF |
OR |
ORD |
OUT |
OVERRIDE |
DEFAULT |
PRIVATE |
PROCEDURE |
PROGRAM |
PROPERTY |
PROTECTED |
PUBLIC |
PUBLISHED |
RECORD |
REPEAT |
SET |
SHL |
SHR |
THEN |
TO |
TRY |
TYPE |
UNIT |
UNTIL |
USES |
VAR |
VIRTUAL |
WHILE |
WITH |
XOR |
4.6.3 Statements |
begin statement1; ... statementN; end |
if expression then statement1 else statement2 |
for counter := expression1 to|downto expression1 do statement |
case expression of caseList1: statement1; ... caseListn: statementN; end |
repeat statement until expression |
while expression do statement |
with object do statement |
uses |
|
try statement except|finally statement end |
exit |
continue |
break |
4.6.4 Types |
Byte, Shortint, Word, SmallInt, Cardinal, Longint, Integer |
Char |
String |
Real, Double, Single, Extended,Comp |
Boolean |
Array |
Record |
Variant |
Enumerations |
Classes |
Bookmarks