UltraFXP functions
Previous  Top  Next

Connect to server
procedure UF_CON(serverame: string);
   
Usage: UF_CON('UF1');
   Comment: connect to server named UF1

   Usage: UF_CON('UF1 UF2 UF3');
   Comment: connect to servers UF1, UF2, and UF3 at same time, SPACE as delimiter

Send raw command to connected server
procedure UF_RAW(servername,command: string);
   Usage: UF_RAW('UF1', 'site who');
   Comment: send 'site who' command to connected server UF1

   Usage: UF_RAW('UF1 UF2', 'site who');
   Comment: send 'site who' command to servers UF1 and UF2, SPACE as delimiter

   Usage: UF_RAW('','site who');
   Comment: send 'site who' command to all connected sites at UltraFXP

Change bookmarked path for server
procedure UF_GotoBM(servername,bookmark: string);
   Usage: UF_GotoBM('server1','pub');
   Comment: change server1's bookmarked path to directory called 'pub'

   Usage: UF_GotoBM('server1 server2 server3','pub');
   Comment: change all of server1, server2, and server3's bookmarked path to directory called pub, SPACE as delimiter

   Usage: UF_GotoBM('','pub');
   Comment: change all connected servers' bookmarked path to 'pub'

Get text from Windows Clipboard
function UF_GetClipText:string;
   Usage: UF_RAW('UF1', 'MKD ' + UF_GetClipText);
   Comment: If there is a string, 'UltraFXP.Rocks', in clipboard, this function creates a direcotry called 'UltraFXP.Rocks' on
       server UF1

Send text to mIRC
procedure UF_MIRC(ALog: string);
   Usage: UF_MIRC('UltraFXP is the best');
   Comment: Send text 'UltraFXP is the best' to active mIRC channel(s)

Sleep
procedure UF_Sleep(Amillisecond: Integer);
   Usage: UF_Sleep(1000);
   Comment: pause for 1 second

Match String
function UF_MATCH(ASource: string; APattern: string);
   Usage: if UF_MATCH(UF_GetClipText,'*Idle*')=1 then UF_RAW('','NOOP');
   Comment: if find 'idle' in clipboard, send 'NOOP' to all connected sites

Disconnect from Site
procedure UF_EXIT(sitename: string);
   Usage: UF_EXIT('UF1');
   Comment: disconnect from a server called UF1

   Usage: UF_EXIT('UF1 UF2 UF3');
   Comment: disconnect from servers UF1, UF2, and UF3, SPACE as delimiter

   Usage: UF_EXIT('');
   Comment: disconnect all idle sites

FXP from Site to Site
procedure UF_FXPDIR(src, srcdir, dest, destdir, dirname: string; subdirCount: Integer);
   Parameters
    src      source ftp server
    src       source directory
    dest      destination ftp server
    destdir      destination directory    
    dirname   directory name
    subdirCount    how many sub directory will be added to queue
         -1 means add all sub directory ,
         1 means add latest 1 directory to queue only,
         2 means add latest 2 directory to queue only. etc..

   Usage: UF_FXPDIR('UF1', '/Soft/', 'UF2', '/Mirror/','',-1);
   Comment: FXP all directory from UF1's /Soft/ directory to UF2's /Mirror/ directory

   Usage: UF_FXPDIR('UF1','Soft','UF2','Mirror','',-1);
   Comment: FXP all directory from UF1's Soft bookmark to UF2's Mirror bookmark

Show a Message Box Dialog
function UF_MsgBox(Caption: string; Text: string; Type: Integer): Integer;
   Parameters
    Caption    dialog box title
    Text       dialog box message to be displayed
    Type       specifies a set of bit flags that determine the contents and behavior of the dialog box

    Flag
    2 message box contains three push buttons: Abort, Retry, and Ignore.
    0 message box contains one push button: OK. This is the default.
    1 message box contains two push buttons: OK and Cancel.
    5 message box contains two push buttons: Retry and Cancel.
    4 message box contains two push buttons: Yes and No.
    3 message box contains three push buttons: Yes, No, and Cancel.

   Return Values
    0    The return value is zero if there is not enough memory to create the message box
    3    Abort button was selected.
    2    Cancel button was selected.
    5    Ignore button was selected.
    7    No button was selected.
    1    OK button was selected.
    4    Retry button was selected.
    6    Yes button was selected.

   Usage: UF_MsgBox('Error' , 'No this site name!', 0);
   Comment: Show a dialog with 1 OK button and Text is 'No this site name');

   Usage: UF_MsgBox('Confirm', 'Do you want to FXP this dir?', 1);
   Comment: Show a dialog with OK and Cancel Button and Text is 'Do you want to FXP this dir?'

   Usage: if UF_MsgBox('Confirm', 'Do you want to FXP this dir?', 1)=1 then
      UF_FXPDIR('UF1', '/PUB/', 'UF2', '/Soft/','',-1);
   Comment: FXP directory 'PUB' from server UF1 into directory 'Soft' on sever 'UF2', if press OK button

FXP to Many Sites at Same Time
procedure UF_CHAINFXPDIR(sites,bookmark,dirname: string; repeatcount: Integer);
   Parameters
    sites      site name list , ';' as delimiter
    bookmark   site bookmark
    dirname   directory name without '/'
    repeatcount    must larger than zero. indicates times need to be refreshed when no files to FXP

   Usage: UF_CHAINFXPDIR('UF1;UF2;UF3','Soft','Mirror',10);
   Comment: fxp 'Mirror' dir in bookmarked path 'Soft' for UF1 to UF2 and from UF2 to UF3 simultaneously, refresh 10 times

   Notes:
    If dirname on Global Skip List, nothing will transfer
    If dirname on Site Skip List, this site will be removed from CHAIN
    if Site is Disable, this site will be removed from CHAIN
    RepeatCount set to 10 is sufficient

Stop ChainFXPDIR
procedure UF_STOPLASTCHAINFXPDIR;

   Usage: UF_STOPLASTCHAINFXPDIR;
   Comment: stop latest UF_CHAINFXPDIR function call

Accept User Input
function UF_InputQuery(Caption, Text: string; var Value: string): Boolean;
   Parameters
    Caption   caption for dialog window
    Text       prompt for input
    Value       input text

   Return Values
    The return value is true if use input text is not empty, else return is false;

   Usage: defaultInput := 'Soft';
      if UF_InputQuery('change to bookmark?' , 'bookmark name', defaultInput) then
      UF_GotoBM('',defaultInput);
   Comment: popup a dialog wait use input a bookmark name, default input text is 'Soft', user can change this text or
       left it as default, after user press ok button, all active servers will change to 'Soft' bookmark;