Home Contact us Partners Publish your software Remove your manuals
 
 
 
 

FTPRush: Pascal script enable user to write scripts for manipulating tasks and perform operation

Introduction
->> FTPRush
->> Tips and Tricks
->> FAQ
   
Quick Tutorials
->> Main Interface
->> File Menu
->> Edit Menu
->> Mark Menu
->> View Menu
->> FTP Menu
->> Tools
->> Compare Folder Contents
->> Clipboard
->> Transfer Mode
->> Transfer Completion Options
   
Getting Started
->> Connect to FTP
->> Disconnect from Site
->> Lock or Unlock Toolbar and Dock
->> Quick Connect to Site
->> Customize Main Interface
   
Dialogs
->> Add or Edit Skiplist
->> Bookmark Dialogs
->> Create CRC Checksum
->> Condition Transfer
->> Edit Queue
->> Export Directory Tree List
->> Fast Search
->> Find Files at Site
->> Hotkey Manager
->> Send RAW Dialog
->> Manual Download
   
Site Manager
->> Import or Export Sites
->> Site Manager Tools
->> General Properties
->> Connection
->> Transfer
   
Options
->> General Option
->> Connection
->> Transfer
->> Display
->> File Associations
->> Event Notification
->> Command Line
->> Wildcard and Regular Expressions
   
Using Scripts
->> Pascal Script
->> FTPRush Object
->> UI Object
->> FTP
->> Event
->> System Variables
->> System Functions
->> Script Library
   
Buy FTPRush Online! Buy FTPRush Online!

Pascal Script

Identifiers

Identifier names in script (variable names, function and procedure names, etc.) follow the most common rules in pascal : should begin with a character (a..z or A..Z), or '_', and can be followed by alphanumeric chars or '_' char. Cannot contain any other character os spaces.

Valid identifiers:
VarName
_Some
V1A2
_____Some____

Invalid identifiers:
2Var
My Name
Some-more
This,is,not,valid

remote keylogger disk recovery application hard disk recovery freeware
mmc data recovery sim card sms recovery partition recovery compact flash
MS Access to MySQL Database Converter usb drive data recovery software partition recovery

Assign statements

Just like in Pascal, assign statements (assign a value or expression result to a variable or object property) are built using ":=".

Examples:

MyVar := 2;
Button.Caption := 'This ' + 'is ok.';

Character strings

strings (sequence of characters) are declared in pascal using single quote (') character. Double quotes (") are not used.You can also use #nn to declare a character inside a string. There is no need to use '+' operator to add a character to a string.

Examples:

A := 'This is FTPRush';
Str := 'Text1 '+'concat';
B := 'String with CR and LF char at the end'#13#10;
C := 'String with '#33#34' characters in the middle';

Comments

Comments can be inserted inside script. You can use // chars or (* *) or { } blocks. Using // char the comment will finish at the end of line.

Examples:

//This is a comment before ShowMessage
ShowMessage('Yes');

(* This is another comment *)
ShowMessage('Yes or No');

{ And this is a comment
with two lines }
ShowMessage('It is');

Variables

There is no need to declare variable types in script. Thus, you declare variable just using var directive and its name. There is no need to declare variables if scripter property OptionExplicit is set to false. In this case, variables are implicit declared.

Examples:

SCRIPT 1:
procedure Msg;
var S;
begin
S:='Hello world!';
ShowMessage(S);
end;

SCRIPT 2:
var A;
begin
A:=0;
A:=A+1;
end;

SCRIPT 3:
var S;
S:='Hello World!';
ShowMessage(S);

Indexes

Strings, arrays and array properties can be indexed using "[" and "]" chars. For example, if Str is a string variable, the expression Str[3] returns the third character in the string denoted by Str, while Str[I + 1] returns the character immediately after the one indexed by I.

Examples:

MyChar:=MyStr[2];
MyStr[1]:='A';
MyArray[1,2]:=1530;
Lines.Strings[2]:='Some text';

Arrays

Script support array constructors and support to variant arrays. To construct an array, use "[" and "]" chars. You can construct multi-index array nesting array constructors. You can then access arrays using indexes. If array is multi-index, separate indexes using ",".

If variable is a variant array, script automatically support indexing in that variable. A variable is a variant array is it was assigned using an array constructor, if it is a direct reference to a Delphi variable which is a variant array (see Delphi integration later) or if it was created using VarArrayCreate procedure. Arrays in script are 0-based index.

if statements

There are two forms of if statement: if...then and the if...then...else. Like normal pascal, if the if expression is true, the statement (or block) is executed. If there is else part and expression is false, statement (or block) after else is execute.

while statements

A while statement is used to repeat a statement or a block, while a control condition (expression) is evaluated as true.The control condition is evaluated before the statement. Hence, if the constrol condition is false at first iteration, the statement sequence is never executed. The while statement executes its constituent statement (or block) repeatedly, testing expression before each iteration. As long as expression returns True, execution continues.

repeat statements

The syntax of a repeat statement is repeat statement1; ...; statementn; until expression where expression returns a Boolean value. The repeat statement executes its sequence of constituent statements continually, testing expression after each iteration. When expression returns True, the repeat statement terminates. The sequence is always executed at least once because expression is not evaluated until after the first iteration.

for statements

Scripter support for statements with the following syntax: for counter := initialValue to finalValue do statement For statement set counter to initialValue, repeats execution of statement (or block) and increment value of counter until counter reachs finalValue.

case statements

if selectorExpression matches the result of one of caseexprn expressions, the respective statement (or block) will be execute. Otherwise, elsestatement will be execute. Else part of case statement is optional. Different from Delphi, case statement in script doesn't need to use only ordinal values. You can use expressions of any type in both selector expression and case expression.

function and procedure

Declaration of functions and procedures are similar to Object Pascal in Delphi, with the difference you don't specify variable types. Just like OP, to return function values, use implicited declared result variable. Parameters by reference can also be used, with the restriction mentioned: no need to specify variable types.

Buy FTPRush Online! Buy FTPRush Online!
 
 
 
 
Home | Contacts | Partners | Publish your software | Remove your manuals