Appearance
BTB Script Complete Command Reference
This document contains all available commands extracted from the AutoComplete system.
Table of Contents
- ADDBACKSLASH
- ADDLOOKUP
- ADDOBJ
- AICLOSE
- AIGET
- AIEXEC
- AIOPEN
- AISET
- AITOKENCOUNT
- APPMESSAGE
- ASC
- B64DECODE
- B64ENCODE
- BASECNV
- BEEP
- BINARYFIND
- BINARYREAD
- BINARYREPLACE
- BINARYSAVE
- BITOP
- BOM
- BYTESTOSTRING
- CALL
- CAPSLOCK
- CASEOF
- CHDIR
- CHECKSERIAL
- CHECKTCPPORT
- CHR
- CLEARERROR
- COLORPERCENT
- COMBINE
- CONVERTCSV
- CONVERTCSVFILE
- CPUUSAGE
- CURDIR
- DATE
- DAYOFWEEK
- DBBACK
- DBBOF
- DBCLOSE
- DBEOF
- DBEXECUTE
- DBFIRST
- DBGET
- DBNEXT
- DBOPEN
- DBPUT
- DDEOPEN
- DDEPOKE
- DDEREQUEST
- DDESENDMACRO
- DDESERVERADDITEM
- DDESERVERGETITEM
- DDESERVERGETMACRO
- DDESERVERSETITEM
- DDESERVERSTART
- DELETEOBJ
- DELETEPAGES
- DELETEPROP
- DESC
- DIALOG
- DIALOGVAR
- DIREXISTS
- DODIALOG
- DOWIZARD
- DTSTR
- DTVAL
- ELSE
- END
- ENDIF
- ENHEXECUTE
- EOM
- ERRORLOG
- EVENTLOG
- EXEC
- EXECUTE
- EXECUTEACCT
- EXITFOR
- EXITFUNC
- EXITLOOP
- EXITSUB
- EXITWHILE
- EXPANDENV
- EXPLORE
- EXTRACT
- FCLOSE
- FEEDBACK
- FEOF
- FGETS
- FILECOPY
- FILEDATE
- FILEDELETE
- FILEEXISTS
- FILEGETATTR
- FILEINFO
- FILENAME
- FILERENAME
- FILESETATTR
- FILEVERSION
- FIND
- FINDAFILE
- FINDBINARY
- FINDFILES
- FINDGET
- FOCUS
- FOCUSCLASS
- FOPEN
- FOR
- FORMAT
- FPUTS
- FTPCONNECT
- FTPDISCONNECT
- FTPEXEC
- FUNC
- GETCLIPBOARD
- GETCONNECTIONS
- GETDESKTOP
- GETDIR
- GETDLGVAR
- GETFILE
- GETFILENAME
- GETFOCUS
- GETFOCUSCLASS
- GETFORMNAME
- GETHTTPTEXT
- GETLOADFILENAME
- GETMOUSEPOS
- GETOBJDIM
- GETOBJPROPEX
- GETOBJVAL
- GETPAGECOUNT
- GETPAGEINFO
- GETPARAM
- GETPRINTERINFO
- GETPRINTERLIST
- GETPRINTERSTATUS
- GETPRINTJOBLIST
- GETPRINTJOBS
- GETPROCESSES
- GETPROCESSLIST
- GETREGION
- GETRFMOBJDIM
- GETSAVEFILENAME
- GETSYSVAR
- GETTEXT
- GETTEXTLINE
- GETTITLE
- GETWINPOS
- GLOBAL
- GOSUB
- GOTO
- GRAB
- HIDEFIELD
- HIDEIDLE
- HIDEPROGRESS
- HOMEDIR
- HTTPEXEC
- IF
- IMAPCONNECT
- IMAPDELETE
- IMAPDISCONNECT
- IMAPGET
- IMAPSEARCH
- IMAPSETUP
- INCLUDE
- INICLOSE
- INIOPEN
- INPUT
- IPADDRESS
- IPADDRESSLIST
- ISNUM
- LEFT
- LEFTPAD
- LENGTH
- LOADFORM
- LOADFORMVARS
- LOADFROMFILE
- LOADVARS
- LOWER
- LPR
- LPRSSL
- LPRSTRING
- LPRSTRINGSSL
- MACRO
- MAPISEND
- MEMOPTIMIZE
- MEMUSAGE
- MID
- MKDIR
- MOUSECLICK
- MOUSECLICKABS
- MOUSECLICKREL
- MOUSEMOVE
- MOUSERESTORE
- MOUSESAVE
- MOUSEUPDOWN
- MOVEOBJ
- MSGBOX
- NEWDOCUMENT
- NOERROR
- NOQUOTES
- NOW
- NUMLOCK
- OSTYPE
- OUTPUT
- PARSE
- PAUSE
- PCLTOTIFFS
- PLAYMEDIA
- POP3DELETE
- POP3DISCONNECT
- POP3FIRSTHEADER
- POP3GETMAIL
- POP3NEXTHEADER
- POP3RETRIEVE
- POP3SETUP
- POS
- PROCESSPAGES
- PROCEXEC
- PROCKILL
- PROCRUNNING
- PROMPT
- PROPEXISTS
- RANDOM
- RAW
- READPROP
- REGCLOSE
- REGGETFLT
- REGGETINT
- REGGETKEY
- REGGETNAME
- REGGETSTR
- REGKEYCOUNT
- REGNAMECOUNT
- REGOPEN
- REGPUTFLT
- REGPUTINT
- REGPUTSTR
- REMOVEBACKSLASH
- RESULT
- RETURN
- RIGHT
- RIGHTPAD
- ROUND
- RPARSE
- SAVECHANGES
- SAVEFORM
- SAVEFORMVARS
- SAVEPAGES
- SAVETOFILE
- SAVEVARS
- SCRIPTDIR
- SEARCHFILE
- SEND
- SERVICE
- SETCLIPBOARD
- SETDLGVAR
- SETFOCUS
- SETOBJPROPEX
- SETOBJVAL
- SETPRIORITY
- SETSAVEPREF
- SETVARBYNAME
- SETWINPOS
- SHOWFIELD
- SHOWIDLE
- SHOWPROGRESS
- SIZEOBJ
- SMTPCONNECT
- SMTPDISCONNECT
- SMTPSEND
- SMTPSETUP
- SNMPCONNECT
- SNMPDISCONNECT
- SNMPGET
- SNMPLIST
- SORTTEXT
- STR
- STRCHKSUM
- STRDECRYPT
- STRENCRYPT
- STRING
- STRINGTOBYTES
- STRREPLACE
- STRVALGET
- STRVALNAMES
- STRVALSET
- SUB
- SYSBREAK
- SYSCMD
- SYSDIR
- SYSINFO
- TEMPDIR
- TEMPLATE
- TEMPLATEVAR
- TEXT
- THEN
- TICKCOUNT
- TIME
- TODBSTR
- TRIM
- TRUNC
- UNIQUEFILE
- UNIQUENAME
- UNZIP
- UPDATEPROGRESS
- UPPER
- VAL
- VARBYNAME
- VAREXISTS
- VERSION
- WAITDOS
- WAITFILELOCK
- WAITFORFILE
- WAITWIN
- WHILE
- WIZARD
- WIZARDSEL
- WIZARDVAR
- WRITEPROP
- WRKCOMMAND
AIOPEN
- Syntax:
AIOPEN(<"Api key">, [Attach Inline], ["System Prompt"], ["End-point URL"]) - Description:
- Open AI channel
- Parameters:
- <"Api key"> = API Key obtained from Google
- [Attach Inline] = Optional: Wether to upload or in-line attach True/False (default = False)
- ["System Prompt"] = Optional system prompt
- ["End-point URL"] = Optional End-point URL
- Returns:
- Handle
- Example:
text
lAIHand = AIOPEN("Apikey")
IF lAIHand > 0 THEN
lResult = AIEXEC(lAIHand, "", "", "")
AICLOSE(lAIHand)
ENDIFAIEXEC
- Syntax:
AIEXEC(<Handle>, <"Prompt">, ["Attachments"]) - Description:
- Execute AI Prompt
- Parameters:
- <Handle> = Handle obtained from AIOPEN
- <"Prompt"> = Prompt instructions
- ["Attachments"] = Optional Attachment List (ex. "FileName=Mime Type")
- Returns: Prompt Result
- Example:
text
lResult = AIEXEC(lAIHand, "", "", "")AIGET
- Syntax:
AIGET(<Handle>, <"Property">, ["Default"]) - Description:
- Get AI property value
- Parameters:
- <Handle> = Handle obtained from AIOPEN
- <"Property"> = "folder" or "attached"
- ["Default"] = Optional default value
- Returns:
- "folder" = ResponseFolder
- "attached" = Trim(SavedFiles.Text)
- Example:
text
lFolder = AIGET(lAIHand, "folder", "")AISET
- Syntax:
AISET(<Handle>, <"Property">, <"Value">) - Description:
- Set additional AI property
- Parameters:
- <Handle> = Handle obtained from AIOPEN
- <"Property"> = "folder" (response media output folder)
- <"Value"> = Value to assign
- Returns: 1 if success, otherwise 0
- Example:
text
AISET(lAIHand, "folder", "C:\\Temp\\AI")AICLOSE
- Syntax:
AICLOSE(<Handle>) - Description:
- Close the AI handle
- Parameters: <Handle> = Handle obtained form AIOpen
- Returns: None
- Example:
text
AICLOSE(Handle)AITOKENCOUNT
- Syntax:
AITOKENCOUNT(<Handle>) - Description:
- Get the AI token count for the request
- Parameters: <Handle> = Handle obtained form AIOpen
- Returns: Number of Token Used
- Example:
text
lToken = AITOKENCOUNT(Handle)ASC
- Syntax:
ASC(<char>) - Description: Converts a character to an ASCII value
- Example:
text
ASC("c")APPMESSAGE
- Syntax:
APPMESSAGE("AppTitle", "ClassName", "Params") - Description: Send Application Message
- Example:
text
APPMESSAGE("AppTitle", "ClassName", "Params")ADDBACKSLASH
- Syntax:
ADDBACKSLASH(<"Folder">) - Description: Append back lash if none exists.
- Example:
text
ADDBACKSLASH("Folder")REMOVEBACKSLASH
- Syntax:
REMOVEBACKSLASH(<"Folder">) - Description: Remove the right-most backslash
- Example:
text
REMOVEBACKSLASH("Folder")RAW
- Syntax:
RAW(<"Host">, <"FileName">, [Port=9100], [Timeout=10000]) - Description:
- Description:
- Send raw print data via TCP/IP to printer.
- Parameters:
- <"Host"> = name or ip of the host, <"FileName"> = File to send, [port] = port number, [timeout] = timeout in milli-seconds
- Returns: True/False
- Example:
text
lRst = RAW("Host", "FileName.txt", 9100)B64DECODE
- Syntax:
B64DECODE(<"todecode">, [wantchecksum]) - Description:
- Description:
- Decode base64 string back to string with optional checksum verification.
- Parameters:
- [wantchecksum] = optional True/False. If True, it will check the embedded checksum value for string integrity. If fails, it will return empty string (default = True)
- Example:
text
B64DECODE("todecode")B64ENCODE
- Syntax:
B64ENCODE(<"toencode">, [linewidth], [wantchecksum]) - Description:
- Description:
- Encode string to base64 string with optional linewidth and checksum value.
- Parameters:
- [linewidth] = optional line width (default = 60)
- [wantchecksum] = True/False. whether to embed checksum value (default = True)
- Example:
text
B64ENCODE("toencode", 60)BASECNV
- Syntax:
BASECNV(<SrcBase>, <DestBase>, <"Number">) - Description: Convert one Base-Number to another
- Example:
text
BASECNV(<SrcBase>, <DestBase>, <"Number">)BEEP
- Syntax:
BEEP <type> - Description:
- Send Different Windows Beep commands
- Parameter: <type>=0 or 4
- Example:
text
BEEP 0BINARYREAD
- Syntax:
BINARYREAD(<"FileName">, [StartPos], [EndPos], [maxAllocation]) - Description:
- Read file in binary content. Returns hex-formatted string
- Parameters:
- <"FileName"> = file name to save as
- [StartPos] = optional file position to start reading (0-based) (default = -1 bof)
- [EndPos] = optional file position to stop reading (0-based) (default = -1 eof)
- [MaxAllocation] = optional maximum memory allocation allowed (default = 8000)
- Example:
text
BINARYREAD("FileName")BINARYSAVE
- Syntax:
BINARYSAVE(<"FileName">, <HexString>, [MaxAllocation]) - Description:
- Save Hex content to file. Return True/False
- Parameters:
- <"FileName"> = file name to save as
- <Hexstring> = Hex formatted string
- [MaxAllocation] = optional maximum memory allocation allowed (default = 8000)
- Example:
text
BINARYSAVE("FileName", hs)BINARYFIND
- Syntax:
BINARYFIND(<"filename">, <"toFind">, [startPos], [distance], [maxAllocation]) - Description:
- Find the occurance of string (in byte/hex format).
- Parameters:
- <"filename"> = file name to find
- <"toFind"> = to find in byte/hex string (example: "A4 bD 00 4f")
- [startPos] = starting from byte position (1-base) (optional)
- [distance] = distance in bytes from the start position
- [maxAllocation] = Max memory allocation (specify as needed)(optional default = 8000)
- Returns: the position it finds (1-base), 0 if not found.
- Example:
text
BINARYFIND("filename", "toFind", startPos, distance)BINARYREPLACE
- Syntax:
BINARYREPLACE(<"fileName">, <"toFind">, <"replaceWith">, [occurrencesToReplace], [maxAllocation]) - Description:
- Find and replace the binary content
- Parameters:
- <"fileName"> = File name
- <"toFind"> = hex/string to find (example: "33 21 00 fa ad")
- <"replaceWith"> = hex/string to replace (example: "33 21 00 fa ad")
- [occurrencesToReplace] = number of occurences to replace (optional)
- [maxAllocation] = Max memory allocation (specify as needed)(optional default = 8000)
- Returns: number of occurences, 0 if fail or not found.
- Example:
text
BINARYREPLACE("fileName", "toFind", "replaceWith")BITOP
- Syntax:
BITOP(<Value1>, <"Operation">, <Value2>) - Description:
- Performs bitwise manipulation of 2 values.
- Available Operations: "and", "or", "not", "xor", "shl", "shr"
- Example:
text
BITOP(x, "and", y)BOM
- Syntax:
BOM() - Description: Get Begining of Month
- Example:
text
BOM(2_or_4)BYTESTOSTRING
- Syntax:
BYTESTOSTRING(<"hexString">, ["nullCharSubstitute"]) - Description:
- Converts byte/hex string to string
- Parameters:
- <"hexString"> = Byte/hex string to convert (example: "A0 BE 00 32")
- ["nullCharSubstitute"] = this will convert 00 to a specified character (optional)
- Example:
text
BYTESTOSTRING("Hex_string", "@")CALL
- Syntax:
CALL <"ScriptName"> - Description: Execute External Script
- Example:
text
CALL <"ScriptName">CAPSLOCK
- Syntax:
CAPSLOCK(<True/False>) - Description: Turn On/Off Capslock
- Example:
text
CAPSLOCK(True)CASEOF
- Syntax:
CASEOF..ENDCASE - Example:
text
CASEOF
CASE x = 1
'-- Codes
CASE x = 2
'-- Codes
OTHERWISE
'-- Codes
ENDCASECHDIR
- Syntax:
CHDIR(<directory>) - Description: Change Directory
- Example:
text
CHDIR("Directory_Name")CHECKSERIAL
- Syntax:
CHECKSERIAL(<"AppName">, <"Serial">) - Description:
- Check whether the given serial number is valid.
- Parameters:
- <"AppName"> = AppName used as seed
- <"Serial"> = Full serial number (XXXXXX-XXXXXX)
- Return: True/False
- Example:
text
l = CHECKSERIAL("AppName", "Serial")CHECKTCPPORT
- Syntax:
CHECKTCPPORT(<"host">, [port], [timeout]) - Description:
- Check the availability of a TCP port.
- Parameters: [port] = port number (default = 80), [timeout] = in milli-second (default = 1000)
- Returns: True/False
- Example:
text
CHECKTCPPORT("host", 80)CHR
- Syntax:
Get the Character corresponded to the ASCII Value - Example:
text
CHR("Character")CLEARERROR
- Syntax:
CLEARERROR() - Description: Clear the Last Reported Error
- Example:
text
CLEARERROR()COLORPERCENT
- Syntax:
COLORPERCENT(<"ImageFileName">) - Description: Analyze amount of color in an image. Returns amount of color in percentage.
- Example:
text
COLORPERCENT("ImageName")COMBINE
- Syntax:
COMBINE(<"text to combine">, <"in file">, <"out file">) - Description: Combine "text to combine" and "in file" together and save the resulting file in "out file". The "in file" file can be a binary file. This function returns: (True/False)
- Example:
text
COMBINE("text", "infile", "outfile")CONVERTCSV
- Syntax:
CONVERTCSV(<"CSVString">, ["ConvertedFileName"], ["RecSecparator"], [FileFormat]) - Description:
- Convert CSV Content to Newline-Separated Items.
- FileFormat: 0=ASCII (Default), 1=UTF8, 2=Unicode
- Example:
text
CONVERTCSV(variable, "ConvertedFileName")CONVERTCSVFILE
- Syntax:
CONVERTCSVFILE(<"CSVFileName">, ["ConvertedFileName"], ["RecSecparator"], [FileFormat]) - Description:
- Convert CSV File to Newline-Separated Items.
- FileFormat: 0=ASCII (Default), 1=UTF8, 2=Unicode
- Example:
text
CONVERTCSVFILE("CSVFileName", "ConvertedFileName")CPUUSAGE
- Syntax:
CPUUSAGE([cpuindex]) - Description: Returns the percentage of CPU Usage (Default cpuindex = 0)
- Example:
text
i = CPUUSAGE()CURDIR
- Syntax:
CURDIR() - Description: Get Current Directory
- Example:
text
CURDIR()DATE
- Syntax:
DATE([year digit or date format string]) - Description:
- Get Current Date (default to short date format based on local setting)
- specify 2 or 4 for year digits or full date format string
- Date Format String:
- "mm/dd/yyyy"
- "m/d/yy"
- Example:
text
DATE(2)DAYOFWEEK
- Syntax:
DAYOFWEEK(["date"]) - Description: Returns day name. ["date"] is optional
- Example:
text
DAYOFWEEK()DBOPEN
- Syntax:
<Handle> = DBOPEN(<"ConnectionString">, [Command Timeout]) - Description:
- Open Database Connection and get the handle
- Parameters:
- <"ConnectionString">=Pass connection specificationd
- Command Timeout=Optional command timeout in secs (Default is 30 secs)
- Example:
text
lDbHand = DBOPEN("ConnectionString")DBCLOSE
- Syntax:
DBCLOSE(<Handle>) - Description: Close Database Connection Handle
- Example:
text
DBCLOSE(<Handle>)DBEXECUTE
- Syntax:
<Result> = DBEXECUTE(<"SQL Statement">) - Description: Execute SQL Command
- Example:
text
lNumRec = DBEXECUTE(<Handle>, "SELECT * FROM Table")DBEOF
- Syntax:
DBEOF(<Handle>) - Description: Check if At the end of Database Table
- Example:
text
DBEOF(<Handle>)DBBOF
- Syntax:
DBBOF(<Handle>) - Description: Check if At the beginning of Database Table
- Example:
text
DBBOF(<Handle>)DBGET
- Syntax:
DBGET(<Handle>, <"FieldName">) - Description:
- Retreive a value from the specified field.
- Notes: DBEXECUTE() must be executed before using this function
- Example:
text
DBGET(<Handle>, "FieldName")DBPUT
- Syntax:
DBPUT(<Handle>, <"FieldName">, <"Value">) - Description:
- Put a value to the specified field.
- Notes: DBEXECUTE() must be executed before using this function
- Example:
text
DBPUT(<Handle>, "FieldName", "Value")DBBACK
- Syntax:
DBBACK(<Handle>) - Description:
- Move back one record.
- Notes: DBEXECUTE() must be executed before using this function
- Example:
text
DBBACK(<Handle>)DBFIRST
- Syntax:
DBFIRST(<Handle>) - Description:
- Move to First Record.
- Notes: DBEXECUTE() must be executed before using this function
- Example:
text
DBFIRST(<Handle>)DBNEXT
- Syntax:
DBNEXT(<Handle>) - Description:
- Advance by one record.
- Notes: DBEXECUTE() must be executed before using this function
- Example:
text
DBNEXT(<Handle>)DDESENDMACRO
- Syntax:
DDESENDMACRO(<channel>, <"macro">) - Description: Send Macro command to DDE
- Example:
text
DDESENDMACRO(<Channel_Number>, "Macro_to_send")DDEOPEN
- Syntax:
DDEOPEN - Example:
text
<Channel_Number> = DDEOPEN("Service_Name", "Topic")DDEPOKE
- Syntax:
DDEPOKE(<channel>, <"item">, <"text to poke">) - Description: Send a value directly to an item in the DDE host application
- Example:
text
DDEPOKE(<Channel_Number>, "Item", "Text_to_poke")DDESERVERGETMACRO
- Syntax:
DDESERVERGETMACRO - Example:
text
DDESERVERGETMACRO()DDESERVERADDITEM
- Syntax:
DDESERVERADDITEM(<"item">) - Description: Adds a new host item for other application to communication with.
- Example:
text
DDESERVERADDITEM("Item")DDESERVERGETITEM
- Syntax:
DDESERVERGETITEM(<"item">) - Description: Retrieves the current text content of the available items.
- Example:
text
DDESERVERGETITEM("Item")DDESERVERSETITEM
- Syntax:
DDESERVERSETITEM(<"item">, <"text">) - Description: Changes the content of the available items.
- Example:
text
DDESERVERSETITEM("Item", "Text_to_set")DDESERVERSTART
- Syntax:
DDESERVERSTART(<"topic">) - Description: Execute the script in DDE host mode.
- Example:
text
DDESERVERSTART("Topic")DDEREQUEST
- Syntax:
DDEREQUEST(<channel>, <"item">) - Description: Retrieves a current value of an item from the host application.
- Example:
text
<Return_String> = DDEREQUEST(<Channel_Number>, "Item")DELETEPAGES
- Syntax:
DELETEPAGES(<"scope">) - Description:
- Delete pages based on the specified scope
- Parameters:
- <"scope"> = "selected", "checked", "all"
- Example:
text
DELETEPAGES("selected")DIALOGVAR
- Syntax:
DIALOGVAR(<"control name">) - Description: Retrieve the value of a Dialog Variable
- Example:
text
DIALOGVAR("E1")DIALOG
- Syntax:
DIALOG..ENDDIALOG - Description:
- Create a customized dialog box.
- In the built-in editor, place the cursor on the
DIALOGkeyword, right-click, and chooseDialog Editorto open the visual dialog designer for the entire highlighted dialog block. - Parameters: DIALOG ["Title"= ""
- Example:
text
DIALOG "Hello", "", 0, 0, False
*FORM
Dimension=1334, 533, 469, 278
PPI=96
Font=Seqoe UI, 10, , clWindowText
Color=clBtnFace
Caption=Dialog Box
FormPos=1
TimeOut=0
ActiveControl=
*BUTTON
Name=btnOk
Dimension=288, 236, 75, 25
Caption=&Ok
Default=0
OnClicked=
*BUTTON
Name=btnCancel
Dimension=378, 236, 75, 25
Caption=Cancel
Default=0
OnClicked=
ENDDIALOGDIREXISTS
- Syntax:
DIREXISTS(<"DirName">) - Description: Check whether the directory exists (Return True/False)
- Example:
text
DIREXISTS("DirName")DODIALOG
- Syntax:
DODIALOG(<"DialogCodes">, ["Title"=""], ["FontName"=""], [Width=0], [Height=0], [AlwaysOnTop=False]) - Description:
- Execute Dialog from codes. Will halt the codes if closes
- Returns: 0 / 1
- Example:
text
DODIALOG(LOADFROMFILE("c:\temp\mydialog.txt", "My Dialog")DOWIZARD
- Syntax:
DOWIZARD(<"WizardCodes">, ["Title"= ""], [Height=-1], [Width=-1], [AlwaysOnTop=False]) - Example:
text
DOWIZARD(s, "Wizard", 500, -1, True)DTSTR
- Syntax:
DTSTR(<date/time value>, [format]) - Description: Convert Date/Time value to String
- Example:
text
DTSTR(<dtr>)DTVAL
- Syntax:
DTVAL(<date/time string>) - Description: Convert Date/Time String to value
- Example:
text
DTVAL(<dtvar>)ERRORLOG
- Syntax:
ERRORLOG("Log_File_Name") - Description: Log error to file
- Example:
text
ERRORLOG("Log_File_Name")EMAIL
- Syntax:
EMAIL - Description: Codes for e-mail
- Example:
text
SMTPSETUP("mail.host.com")
SMTPCONNECT()
SMTPSEND("sender@email.com", "receiver@email.com", "Subject", "Content", "AttachmentFile")
SMTPDISCONNECT()END
- Syntax:
Mark the end of script
EOM
- Syntax:
EOM(<year digit>) Get End of Month. <year digit> can be 2 or 4. - Example:
text
EOM(2_or_4)EVENTLOG
- Syntax:
EVENTLOG(<"Message">, [Type], [EventID]) - Description:
- Log Message to Windows Event Log
- Parameters: <"Message"> = Text message [Type] = 0-Info, 1-Error, 2-Warning (default 0) [EventID] = any numerical value (default 0)
- Example:
text
EVENTLOG("Message", 0)ENHEXECUTE
- Syntax:
ENHEXECUTE(<"Application Name">, <"Parameters">, ["Current Dir"], [TimeOut(sec)], [Visibility]) - Description:
- Run an external application and return the text output
- Visibility: 0=Hide (Default), 1=Visible
- Example:
text
s = ENHEXECUTE("Application_Name", "Parmeters", "", 10)EXEC
- Syntax:
EXEC(<"Application Name">, <"Parameters">, [TimeOut(sec)], [Visibility]) - Description:
- Run an external application
- Visibility: 0=Hide, 1=Visible (Default)
- Returns Exit Code
- Example:
text
i = EXEC("notepad.exe")EXECUTE
- Syntax:
EXECUTE <"Application Name">, <"Parameters">, [TimeOut(sec)], [Visibility] - Description:
- Run an external application
- Visibility: 0=Hide, 1=Visible (Default)
- Old Method: EXECUTE <"Application Name>;<Parameters">
- Example:
text
EXECUTE "Application_Name_and_Parmeter"EXECUTEACCT
- Syntax:
EXECUTEACCT <"domain">, <"user">, <"password">, <"Application Name">, <"Parameters">, [TimeOut(sec)], [Visibility] - Description:
- Run an external application with login
- Visibility: 0=Hide, 1=Visible (Default)
- Notes: "." for no domain
- Example:
text
EXECUTEACCT "Application_Name_and_Parmeter"
EXECUTEACCT ".", "name", "pwd", "c:\windows\system32\notepad.exe", ""EXTRACT
- Syntax:
EXTRACT(<"in file">, <"text to find">, <"out file">) - Description: Extract the content of "in file" file up to "text to find" and save the rest of the file in "out file". This can be a binary file. This function returns the extracted content.
- Example:
text
s = EXTRACT("infile", "text", "outfile")VAREXISTS
- Syntax:
VAREXISTS("varname") - Description: Check whether the variable exists (True/False)
- Example:
text
VAREXISTS("varname")EXITFUNC
- Syntax:
EXITFUNC - Description: Exit out of a function
- Example:
text
EXITFUNCEXITFOR
- Syntax:
EXITFOR - Description: Exit out of a for loop
- Example:
text
EXITFOREXITLOOP
- Syntax:
EXITLOOP - Description: Exit out of any loop
- Example:
text
EXITLOOPEXITSUB
- Syntax:
EXITSUB - Description: Exit out of a subroutine
- Example:
text
EXITSUBEXITWHILE
- Syntax:
EXITWHILE - Description: Exit out of a while loop
- Example:
text
EXITWHILEEXPANDENV
- Syntax:
EXPANDENV(<"path">) - Description:
- Expand any environmental variables within the
<"path">(example:"%temp%\\test.txt") <"path">= Path that may contain the environmental variable
- Expand any environmental variables within the
- Example:
text
EXPANDENV("path")EXPLORE
- Syntax:
EXPLORE(<"Application or Document Name">) - Description: Open/Run Application/Document
- Example:
text
EXPLORE("Application_OR_Document")FEEDBACK
- Syntax:
FEEDBACK - Example:
text
FEEDBACK()FCLOSE
- Syntax:
FCLOSE(<file handle>) - Description: Close a file that is opened with FOPEN
- Example:
text
FCLOSE(lhand)FEOF
- Syntax:
FEOF(<file handle>) - Description: Check for End-of-file of a file that is opened with FOPEN
- Example:
text
FEOF(lhand)FGETS
- Syntax:
FGETS(<FileHandle>) - Description: Get text from a file that is opened with FOPEN
- Example:
text
FGETS(lhand)FILECOPY
- Syntax:
b = FILECOPY(<"source">, <"destination">) - Description:
- Copy a file
- Returns True/False
- Example:
text
FILECOPY("source", "destination")FILEDATE
- Syntax:
FILEDATE(<"FileName">, ["dateformat"]) - Description:
- Returns the modified date of a file
- Parameters: <"FileName"> = file name ["dateformat"] = format string (default to local system setting)
- Date/Time Format String:
- "mm/dd/yyyy hh:nn:ss"
- "m/d/yy hh:nn am/pm"
- Example:
text
FILEDATE("filename")FILEDELETE
- Syntax:
b = FILEDELETE(<"filename">) - Description: Delete a file
- Example:
text
FILEDELETE("File_Name")FILEEXISTS
- Syntax:
b = FILEEXISTS(<"filename">) - Description:
- Check an Existance of a file.
- Returns True/False
- Example:
text
FILEEXISTS("File_Name")FILEGETATTR
- Syntax:
FILEGETATTR(<"filename">) - Description: Get the attributes of a file.
- Example:
text
FILEGETATTR()FILEINFO
- Syntax:
FILEINFO(<"type">, <"filename">) - Description:
- Get file date/time or length of a file.
- Type = "age", "size". "version"
- Example:
text
FILEINFO("age", )FILENAME
- Syntax:
t = FILENAME(<"type">, <"filename">) - Description:
- Extracts various elements of a file name
- Available types:
- "name"=filename, "path"=file path, "ext"=extension
- Example:
text
FILENAME("path", )FILERENAME
- Syntax:
FILERENAME(<"OldName">, <"NewName">) - Description: Rename the file.
- Example:
text
FILERENAME("<OldName">, <"NewName">)FILESETATTR
- Syntax:
FILESETATTR(<"filename">, <"attributes">) - Description: Set the attributes of a file.
- Example:
text
FILESETATTR("", "A,R")FILEVERSION
- Syntax:
FILEVERSION(<"filename">) - Description: Get the file version of an EXE or DLL if any.
- Example:
text
FILEVERSION("")FIND
- Syntax:
FIND(<"string">, <"substring">), [0=Case Insensitive 1=Case Sensitive (Default = 0)]) - Description: Find a sub-string from the source string (same as POS function)
- Example:
text
FIND("string", "substring"), [0=Case Insensitive 1=Case Sensitive (Default = 0)])FINDBINARY
- Syntax:
FINDBINARY(<"FileName">, <"ToFind">, ["ToReplace"]) - Description:
- Look for text in any file. ["ToReplace"] is optional.
- Returns: Byte Ppostion if found, 0 if not found.
- Example:
text
FINDBINARY("file.txt", "tofind", "toreplace)FINDAFILE
- Syntax:
FINDAFILE(<"spec">) - Description:
- Look for a file that matches <"spec">.
- Return just the file name without path.
- Example:
text
FINDAFILE("readme.txt")FINDFILES
- Syntax:
FINDFILES(<"spec">, [SortByDate]) - Description:
- Look for multiple files that match <"spec">. Use FINDGET() to retrieve the files found.
- Parameters:
- <"spec"> = File name specs. including path (ex. (c:\temp*.pdf")
- [SortByDate] = Optional True/False (default is False)
- Returns:
- No. of files found.
- Example:
text
FINDFILES("*.txt")FINDGET
- Syntax:
FINDGET(<index>) - Description:
- Used for retrieving the files found from FINDFILES().
- Return just the file name without path.
- Example:
text
FINDGET()FOCUS
- Syntax:
FOCUS(<"Title">, <Timeout>, [Options]) - Description:
- Set the Current Window Focus to the specified window.
- Tips: Use Tools > Focus Finder to find <"Class Name">
- Parameters:
- Title "*" = Active Window, "!" = Windows currently on top, "^" = last focused window
- Timeout Number of Seconds to wait
- Options 1=Title matches left most part of windows title, 2=Title match any part of windows title
- Example:
text
IF FOCUS("", 10) = True THEN
'-- Codes Here
ENDIFFOCUSCLASS
- Syntax:
FOCUSCLASS(<"Class Name">, <Timeout>, [options]) - Description:
- Wait for a window with <"Class Name"> and set the focus to it.
- Tips: Use Tools > Focus Finder to find <"Class Name">
- Parameters:
- Title "*" = Active Window, "!" = Windows currently on top, "^" = last focused window
- Timeout Number of Seconds to wait
- Options 1=Title matches left most part of windows title, 2=Title match any part of windows title
- Example:
text
IF FOCUSCLASS("", 10) = True THEN
'-- Codes Here
ENDIFFOPEN
- Syntax:
FOPEN(<"FileName">, [Mode]) - Description:
- Open a file if Mode is defaulted to 0 if Mode is not specified.
- Mode: 1=Read, 2=CreateWrite, 3=AppendWrite
- Example:
text
lfile = FOPEN("", 1)
IF lfile > 0 THEN
'-- Loop while not end of file
WHILE FEOF(lfile) = False
'-- Codes Here
ENDWHILE
FCLOSE(lfile)
ENDIFFOR
- Syntax:
FOR <var> = <start> TO <end> - Description: FOR loop is used for loop where begin and end bounds are known
- Example:
text
FOR i = 0 to 100
'-- Codes
ENDFORFORMAT
- Syntax:
FORMAT(<"Format">, param1, parm2, ...) - Description: Create Display Format
- Example:
text
FORMAT("", param1, parm2, ...)FPUTS
- Syntax:
FPUTS(<file handle>, <"text">) - Description: Put text to a file that is opened with FOPEN
- Example:
text
FPUTS(lhand, "Text_to_write")FTPCONNECT
- Syntax:
FTPCONNECT(<Server>, [User], [Password], [Proxy], [Port], [Passive], [TransferType] ) - Description:
- Establish a connection to an FTP server.
- Parameters:
- <Server> = Host Name
- [User] = Name of user (default = anonymous)
- [Password] = Password (default = "anonymous@anonymous.com")
- [Proxy] = Proxy (default = "")
- [Port] = Port Number (default = 21)
- [Passive] = Passive Mode True/False (default = True)
- [TransferType] = 0 = Ansi, 1 = Binary (default = 1)
- Example:
text
FTPCONNECT("", "anonymous", "anonymous@anonymous.com")FTPDISCONNECT
- Syntax:
FTPDISCONNECT() - Description: Disconnect from a FTP server.
- Example:
text
FTPDISCONNECT()FTPEXEC
- Syntax:
FTPEXEC(<command>, <param 1>, [param 2]) - Description: Provides a way to interact with an FTP server.
- Example:
text
FTPEXEC("", "")FUNC
- Syntax:
FUNC..ENDFUNC - Description: Create Function Block
- Example:
text
'-------------------------------------------------------------------------------
FUNC
'-- Codes
RESULT = 0
ENDFUNCGETCLIPBOARD
- Syntax:
GETCLIPBOARD() - Description: Retrieve a string from windows clipboard
- Example:
text
GETCLIPBOARD()GETDESKTOP
- Syntax:
GETDESKTOP("W=Width,H=Height") - Description: Get Windows Desktop Dimension
- Example:
text
GETDESKTOP("W")GETDIR
- Syntax:
GETDIR(["path/directory"], ["caption"]) - Description:
- Popup a directory selection dialog box for user to choose a directory.
- Parameters:
- ["path/directory"]=initial path
- ["caption"]=caption
- Example:
text
GETDIR("", "Select Something")GETDLGVAR
- Syntax:
GETDLGVAR(<"control name">) - Description: Retrieve the value of a Dialog Variable
- Example:
text
GETDLGVAR("E1")GETFILE
- Syntax:
GETFILE(["filename"], ["Title"], ["path/directory"], ["spec"]) - Description:
- Popup a file selection dialog box for user to choose a file.
- Returns the filename.
- Example:
text
GETFILE("", "Load File", "", "*.txt*.txt")GETFILENAME
- Syntax:
GETFILENAME() - Description:
- Get currently opened file name
- Returns: Fileame
- Example:
text
s = GETFILENAME()GETFOCUS
- Syntax:
GETFOCUS() - Description: Retrieve the Window Title that FOCUS() or FOCUSCLASS() is set to. (Same as GETTITLE())
- Example:
text
i = GETFOCUS("", 10)GETFOCUSCLASS
- Syntax:
GETFOCUSCLASS(<"Class Name">, <Timeout>, [options]) - Description:
- Look for a window with <"Class Name"> and set the focus to it and returns the handle.
- Tips: Use Tools > Focus Finder to find <"Class Name">
- Parameters:
- Title "*" = Active Window, "!" = Windows currently on top, "^" = last focused window
- Timeout Number of Seconds to wait
- Options 1=Title matches left most part of windows title, 2=Title match any part of windows title
- Example:
text
i = GETFOCUSCLASS("", 10)GETFORMNAME
- Syntax:
GETFORMNAME() (Reform Shortcut Version Only) - Description: Retrieves the form name that Reform currently processing.
- Example:
text
= GETFORMNAME()GETLOADFILENAME
- Syntax:
GETLOADFILENAME(["filename"], ["Title"], ["path/directory"], ["spec"]) - Description: Popup a file selection dialog box for user to choose a file.
- Example:
text
GETLOADFILENAME("", "Load File", "", "*.txt*.txt")GETMOUSEPOS
- Syntax:
GETMOUSEPOS(<"X/Y">) - Description: Retrieve the current X or Y position of the mouse depending on the parameter value specified.
- Example:
text
GETMOUSEPOS("x")GETPAGECOUNT
- Syntax:
GETPAGECOUNT(["scope"]) - Description:
- Get page count of the currently opened/scanned file based on the specified scope.
- Parameters:
- ["scope"] = "selected", "checked", "all" (Optional, default = all)
- Returns number of pages.
- Example:
text
i = GETPAGECOUNT()GETPAGEINFO
- Syntax:
GETPAGEINFO(<"type">, [page no]) - Description:
- Get information about the scanned page.
- Parameters:
- <"type"> = dpi, width, height, format
- [page no] = optional. the page you want to get info from. 0 = current (default = 0)
- Returns: The requested information.
- Example:
text
ldpi = GETPAGEINFO("dpi")GETPARAM
- Syntax:
GETPARAM(<param number>) - Description: Retrieve the parameters passed at the time of Shortcut execution.
- Example:
text
GETPARAM(<parameter number>)GETPRINTERINFO
- Syntax:
GETPRINTERINFO(<"PrinterName">, <"Info">) - Description:
- Retrieve information about the printer.
- <"Info"> = Property that you want to retrieve
- If successful, returns the value of the specified property, if fails, returns empty string
- Example:
text
s = GETPRINTERINFO("PrinterName", "Attribute")GETPRINTJOBS
- Syntax:
GETPRINTJOBS(<"PrinterName">, <OutPages>, <OutStatus>, [OutJobs]) - Description:
- Get the print job info from a printer
- Returns True/False.
- Also passes back OutPages, OutStatus and optional OutJobs.
- <OutPage>=Number of pages, <OutStatus>=Status of Printer, [OutJobs]=Number of Jobs in the Queue (Optional)
- Example:
text
GETPRINTJOBS("PrinterName", lOutPages, lOutStatus, lOutJob)GETPRINTERLIST
- Syntax:
GETPRINTERLIST([OnlyLocal]) - Description:
- Get the list of available printers
- Parameters: [LocalOnly] = Only retrieve local printer (True/False (default False)
- Returns: List of printers
- Example:
text
GETPRINTERLIST()GETPRINTJOBLIST
- Syntax:
GETPRINTJOBLIST(<"Printer Name">, [OnlyLocal]) - Description:
- Get the lsit of print jobs
- Parameters: <"Printer Name"> = the name of the printer, [OnlyLocal] = retrieve only the local printer jobs (True/False, Default False)
- Returns: List of PrintJobInfo
- PrintJobInfo: <ComputerName>!<User>!<DocumentName>!<Status>!<TotalPages>!<JobID>!<DateTime>
- Example:
text
GETPRINTJOBLIST()GETPRINTERSTATUS
- Syntax:
GETPRINTERSTATUS(<"PrinterName">) - Description:
- Get the printer status whether it is online, offline, error, etc.
- Returns:
- "na" = Printer is not available
- "offline" = Printer is offline
- "ready" = Printer is ready
- Example:
text
GETPRINTERSTATUS("PrinterName")GETPROCESSES
- Syntax:
GETPROCESSES() - Description: Returns the running processes
- Example:
text
s = GETPROCESSES()GETPROCESSLIST
- Syntax:
GETPROCESSLIST([withPID]) - Description:
- Returns the running processes (enhanced ver of GETPROCESSES())
- [withPID] = include PID (optional, returns Name=Pid) (True or False, default is False)
- Example:
text
s = GETPROCESSLIST()GETREGION
- Syntax:
GETREGION(<"inputfile">, <"outputfile">, <Left>, <Top>, <Right>, <Bottom>, ["inches"]) - Description:
- Extract specfied region from <inputfile> and save to <outputfile>. Return: True/False
- Parameters:["inches"] = optional, assumes pixels if not specified.
- Example:
text
GETREGION("", "output.tif", 1, 1, 4, 4, "inches")GETHTTPTEXT
- Syntax:
Retrieve Extracted Text from Http Content - Example:
text
GETHTTPTEXT(s)GETTEXT
- Syntax:
GETTEXT(<"string">, <row>, <col>, [length]) - Description: Retrieve text by row col position within a variable
- Example:
text
GETTEXT(, 10, 1)GETSAVEFILENAME
- Syntax:
GETSAVEFILENAME(["filename"], ["Title"], ["path/directory"], ["spec"]) - Description: Popup a file selection dialog box for user to choose file name to save.
- Example:
text
GETSAVEFILENAME("", "Save File", "", "*.txt*.txt")GETSYSVAR
- Syntax:
GETSYSVAR(<"varname">) - Description:
- Get the value of the system variables.
- Parameters:
- <"varname"> = "filename", watchedfolder"
- Returns the value of the specified variable.
- Returns: True/False
- Example:
text
GETSYSVAR("filename")GETTEXTLINE
- Syntax:
GETTEXTLINE(<"string">, <lineno>) - Description: Retrieve text by line number (1 = first line)
- Example:
text
= GETTEXTLINE(s, 1)GETTITLE
- Syntax:
GETTITLE() - Description: Retrieve the Window Title that FOCUS() or FOCUSCLASS() is set to. (Same as GETFOCUS())
- Example:
text
GETTITLE()GETWINPOS
- Syntax:
GETWINPOS("L=Left, T=Top, W=width, H=Height") - Description: Get Window Position
- Example:
text
GETWINPOS("L")GLOBAL
- Syntax:
GLOBAL <var> - Description: Declare a variable as global
- Example:
text
GLOBAL gLicenseKeyGOSUB
- Syntax:
GOSUB <SubroutineName> - Description: CALL Subroutine Label (obsolete, use SUB..ENDSUB/FUNC..ENDFUNC)
- Example:
text
GOSUB <LabelName>GOTO
- Syntax:
GOTO <Label> - Description: GOTO Label (obsolete, use SUB..ENDSUB/FUNC..ENDFUNC)
- Example:
text
GOTO <LabelName>GRAB
- Syntax:
GRAB(<Row>, <Col>, <Width>) - Description: Grab a text from screen and put the text into a variable.
- Example:
text
GRAB(1, 1, 30)HIDEFIELD
- Syntax:
HIDEFIELD(<"objname">) - Description: Hide an Object
- Example:
text
HIDEFIELD("_Text_Field")HIDEIDLE
- Syntax:
HIDEIDLE() - Description: Hide the idle dialog
- Example:
text
HIDEIDLE()HIDEPROGRESS
- Syntax:
HIDEPROGRESS() - Description: Hide the Progress dialog
- Example:
text
HIDEPROGRESS()HOMEDIR
- Syntax:
HOMEDIR() - Description: Get the Diretory where the script is launched from
- Example:
text
HOMEDIR()HTTPEXEC
- Syntax:
HTTPEXEC(<"action">, <"Url">, ["Request Content"], ["Headers"]) - Description:
- Get or Retrieve the web content.
- Parameters:
- <"action"> = "get", "post", "put", "delete"
- <"Url"> = Web address
- ["Request Content"] = Optional request content
- ["Headers"] = Optional header key=value pairs
- Returns:
- If Ok, return the raw text content
- Example:
text
HTTPEXEC("get", "www.yahoo.com")IF
- Syntax:
IF condition THEN .. ENDIF - Description:
- Create Conditional Block (Must end with ENDIF)
- BTB does not support grouped conditions in parentheses.
- Do not write boolean condition groups such as
(a = 1 OR b = 2).
- Example:
text
IF i = 1 THEN
'-- Codes
ELSE
'-- Codes
ENDIFTHEN
- Syntax:
IF condition THEN .. ENDIF - Description: Part of IF..THEN statement
ELSE
- Syntax:
IF condition THEN .. ELSE .. ENDIF - Description: Part of IF THEN/ENDIF
ENDIF
- Syntax:
IF condition THEN .. ENDIF - Description: End IF..THEN block
IMAPCONNECT
- Syntax:
IMAPCONNECT() - Description:
- Connect to IMAP server.
- Return: True/False
- Example:
text
IMAPCONNECT()IMAPDELETE
- Syntax:
IMAPDELETE(<Index>) - Description:
- Delete the found mail
- Parameters: <Index> = Index of the found mail
- Returns: True/False
- Example:
text
IMAPDELETE(Index)IMAPDISCONNECT
- Syntax:
IMAPDISCONNECT() - Description: Disconnect from the IMAP server
- Example:
text
IMAPDISCONNECT()IMAPSEARCH
- Syntax:
IMAPSEARCH(<"from">, <"subject">, <"body">) - Description:
- Search for mail
- Parameters: <"from"> = word to search in from email, <"subject"> = word to search in subject, <"body"> = word to search in body
- Returns: Number of email found
- Example:
text
IMAPSEARCH("from", "subject", "body")IMAPSETUP
- Syntax:
IMAPSETUP(<"host">, <"user">, <"pwd">, <port>, [SSLMethod]) - Description:
- Setup IMAP mail server settings
- Parameters:
- SSLMethod - (0=sslvSSLv2, 1=sslvSSLv23, 2=sslvSSLv3, 3=sslvTLSv1 (default), 4=sslvTLSv1_1, 5=sslvTLSv1_2)
- Example:
text
IMAPSETUP("www.gmail.com", "user@gmail.com", "apppwd", 993)IMAPGET
- Syntax:
IMAPGET(<Index>, <PlainText>) - Description:
- Retreive the mail that is found.
- Parameters: <Index> = index of the found mail (0-base), <PlainText> = true/false if want pain text
- Returns: The mail content string
- Example:
text
IMAPGET(Index, PlainText)INCLUDE
- Syntax:
INCLUDE <"script file name"> - Description: Allows you to use subroutines or functions from an external script file.
- Example:
text
INCLUDE "c:\scripts\utils.bbs"INPUT
- Syntax:
INPUT <"prompt">, <var> - Description: Ask for user input
- Example:
text
INPUT "Question Prompt", <Variable>INIOPEN
- Syntax:
INIOPEN("IniFileName") - Description: Open the ini file
- Example:
text
= INIOPEN("IniFileName")INICLOSE
- Syntax:
INICLOSE(IniHandle) - Description: Close the ini file
- Example:
text
INICLOSE(IniHandle)IPADDRESS
- Syntax:
IPADDRESS() - Description: Return IP address of the local adapter.
- Example:
text
IPADDRESS()IPADDRESSLIST
- Syntax:
IPADDRESSLIST() - Description: Returns list of local IP addresses.
- Example:
text
IPADDRESSLIST()ISNUM
- Syntax:
ISNUM(<"text">) - Description: Returns a value indicating whether an expression is a number (True/False).
- Example:
text
ISNUM("Text")LEFT
- Syntax:
LEFT(<"text">, <no. of chars>) - Description: Get Leftmost string from within the source string
- Example:
text
LEFT("", 5)LEFTPAD
- Syntax:
LEFTPAD(<"text">, <no. of chars>, <pad char>) - Description: Pads a string with the specified character to the left
- Example:
text
LEFTPAD("", <Number_of_chars>, <char_to_pad>)LENGTH
- Syntax:
LENGTH(<"text">) - Description: Get the length of a Text
- Example:
text
LENGTH("Text")LOADFORMVARS
- Syntax:
LOADFORMVARS(["Optional_FileName"], ["Optional_Field_Spec"]) (Reform Shortcut Version Only) - Description: Retrieve the entire content of Reform Fields from a File that is saved with SAVEFORMVARS
- Example:
text
LOADFORMVARS("default.mem", "_Label")LOADFROMFILE
- Syntax:
LOADFROMFILE(<"FileName">, [replace null], [unicode]) - Description:
- Load the content of a file to a variable
- [replace null] = optional parameter whether to replace null character (0=No (default), 1=Yes)
- [unicode] = For Unicode Format (0=ANSI (default), 1=UTF-8, 2=UTF-16)
- Example:
text
LOADFROMFILE("FileName")LOADVARS
- Syntax:
LOADVARS(<"filename">, ["spec"], [Encrypt_Seed]) - Description: Load variables from file that is created with SAVEVARS.
- Example:
text
LOADVARS("Filename")LOWER
- Syntax:
LOWER(<"text">) - Description: Converts a string to lower case
- Example:
text
LOWER("Text")LPR
- Syntax:
LPR(<"Host">, <"Queue">, <"FileToSend">, [timeout], [UserName]) - Description:
- Print the file via LPR.
- [timeout] is in milli-seconds and is optional (default is 10000 milli-seconds)
- [UserName] is optional (default is current usernamme)
- Example:
text
LPR("Host", "Queue", "FileToSend")LPRSTRING
- Syntax:
LPRSTRING(<"Host">, <"Queue">, <"String to send">, [timeout], [UserName]) - Description:
- Send string via LPR.
- [timeout] is in milli-seconds and is optional (default is 10000 milli-seconds)
- [UserName] is optional (default is current usernamme)
- Example:
text
LPRSTRING("Host", "Queue", "StringToSend")LPRSSL
- Syntax:
LPRSSL(<"Host">, <"Queue">, <"FileToSend">, [port], [timeout], [UserName]) - Description:
- Print the file via LPR using SSL connection.
- [port] Optional Port (default = 515)
- [timeout] is in milli-seconds and is optional (default is 10000 milli-seconds)
- [UserName] is optional (default is current usernamme)
- Example:
text
LPRSSL("Host", "Queue", "FileToSend")LPRSTRINGSSL
- Syntax:
LPRSTRINGSSL(<"Host">, <"Queue">, <"String to send">, [port], [timeout], [UserName]) - Description:
- Send string via LPR using SSL connection.
- [port] Optional Port (default = 515)
- [timeout] is in milli-seconds and is optional (default is 10000 milli-seconds)
- [UserName] is optional (default is current usernamme)
- Example:
text
LPRSTRINGSSL("Host", "Queue", "StringToSend")MACRO
- Syntax:
MACRO..ENDMACRO - Description: Begin of Macro Codes (must end with ENDMACRO)
- Example:
text
MACRO "Destination Title (optional)"
<Keystrokes>
ENDMACROMAPISEND
- Syntax:
MAPISEND(<"To">, <"Subject">, <"Content">, ["Attach Files"]) - Description: Send MAPI Mail
- Example:
text
MAPISEND("To", "Subject", "Content", "attachments")MEMUSAGE
- Syntax:
MEMUSAGE(<"WindowTitle">, ["ClassName"]) - Description: Return memory usage of the selected process name
- Example:
text
i = MEMUSAGE("Untitled - notepad")MEMOPTIMIZE
- Syntax:
MEMOPTIMIZE([Threshold]) - Description:
- Tells the script to defrag the memory. Should be done once in a while.
- Parameters: [Threshold] = Optional Memory size before doing the optimization in bytes. (Default is 6000000)
- Example:
text
MEMOPTIMIZE()MID
- Syntax:
MID(<text>, <start pos.>, <no. of chars>) - Description: Get a string from any position within the source string
- Example:
text
MID("", 1, 10)MKDIR
- Syntax:
MKDIR(<"directory">) - Description:
- Create a new Directory
- Returns True/False
- Example:
text
MKDIR("Directory_Name")MOUSECLICK
- Syntax:
MOUSECLICK(<"Window Title>, "Text", <Timeout>) - Description:
- Send Mouse Click to a window control.
- Tip: Use Tools | Mouse-Click Assistant
- Example:
text
MOUSECLICK("Window_Title", "Text", <Timeout>)MOUSECLICKABS
- Syntax:
MOUSECLICKABS(<x>, <y>) - Description: Move the mouse and click at the specified x and y location. <x> and <y> are measured in pixels.
- Example:
text
MOUSECLICKABS(10, 10)MOUSECLICKREL
- Syntax:
MOUSECLICKREL(<"Window Title">, <x>, <y>, <Timeout>) - Description: Send Mouse Click (Relative Position) to a window
- Example:
text
MOUSECLICKREL("Window_Title", <x>, <y>, <Timeout>)MOUSEMOVE
- Syntax:
MOUSEMOVE(<x>, <y>) - Description: Move Mouse the a specified location
- Example:
text
MOUSEMOVE(100, 100)MOUSERESTORE
- Syntax:
MOUSERESTORE - Description: Restore Mouse Position
- Example:
text
MOUSERESTOREMOUSESAVE
- Syntax:
MOUSESAVE - Description: Save Mouse Position
- Example:
text
MOUSESAVEMOUSEUPDOWN
- Syntax:
MOUSEUPDOWN("L=Left,M=Middle,R=Right", "U=Up, D=Down", [x], [y]) - Description: Simulate the mouse button up or down.
- Example:
text
MOUSEUPDOWN("L", "D", 10, 10)MSGBOX
- Syntax:
MSGBOX(<"message">, [type], [buttons]) - Description:
- Display windows standard message box.
- Type: 1=Exclaimation, 2=Error, 3=Info
- Buttons: 0=Ok, 1=Ok/Cancel, 2=Yes/No
- Returns: 1 = Yes/Ok, 0=No/Cancel
- Example:
text
i = MSGBOX("Hello, World!", 3, 1)NEWDOCUMENT
- Syntax:
NEWDOCUMENT() - Description: Start a new document
- Example:
text
NEWDOCUMENT()NOERROR
- Syntax:
NOERROR(0/1) - Description: Turn on/off, error notification.
- Example:
text
NOERROR(1)NOQUOTES
- Syntax:
NOQUOTES(<"FileName">, [Quote Char]) - Description:
- Trim off quotes
- Parmeters: [Quote Char] = the quote character (default = '"')
- Example:
text
NOQUOTES("FileName")NOW
- Syntax:
NOW([date/time format string]) - Description:
- Returns the current date and time.
- Parmeter: [date/time format string] = Date/time format string
- Available Date/Time Format String
- "mm/dd/yyyy hh:nn:ss"
- "m/d/yy h:n am/pm"
- Example:
text
NOW()NUMLOCK
- Syntax:
NUMLOCK(<True/False>) - Description: Turn On/Off NumLock
- Example:
text
NUMLOCK(True)OSTYPE
- Syntax:
OSTYPE() - Description:
- Retrieve the current Operation System type.
- Return: 1=Win95, 2=WinNT, 3=Win32
- Example:
text
OSTYPE()OUTPUT
- Syntax:
OUTPUT(<mode>) - Description:
- Specifies how PRINT and PROMPT commands should display the text.
- 1=Normal, 2=Console
- Example:
text
OUTPUT(2)PARSE
- Syntax:
PARSE(<text variable>, <"delimited">) - Description: This function parses the <text variable> and returns the left-side portion of the <delimited>.
- Example:
text
PARSE(var, "Delimiter")PAUSE
- Syntax:
PAUSE <no. seconds> - Description: PAUSE the script for a number of seconds. Fractional of second is allowed.
- Example:
text
PAUSE 1.5PLAYMEDIA
- Syntax:
PLAYMEDIA("FileName") - Description: Play WAV, MIDI, or AVI files that are recognized by windows.
- Example:
text
PLAYMEDIA("")POP3DELETE
- Syntax:
POP3DELETE(<Mail_index>) - Description: Delete POP3 Mail
- Example:
text
POP3DELETE(<Mail_index>)POP3DISCONNECT
- Syntax:
POP3DISCONNECT() - Description: Disconnect from POP3 Server
- Example:
text
POP3DISCONNECT()POP3FIRSTHEADER
- Syntax:
POP3FIRSTHEADER(<From>, <Subject>) - Description: Retrieve the first mail header.
- Example:
text
POP3FIRSTHEADER(<From_Variable>, <Subject_Variable>)POP3NEXTHEADER
- Syntax:
POP3NEXTHEADER(<From>, <Subject>) - Description: Retrieve the next mail header.
- Example:
text
POP3NEXTHEADER(<From_Variable>, <Subject_Variable>)POP3GETMAIL
- Syntax:
POP3GETMAIL(<Mail_index>, <Content_Variable>, ["AttachmentDir"]) - Description:
- Retrieve POP3 Mail (same as POP3RETRIEVE).
- if AttachentDir is specified, the attachments will be saved there.
- Example:
text
POP3GETMAIL(<Mail_index>, <Content_Variable>)POP3RETRIEVE
- Syntax:
POP3RETRIEVE(<Mail_index>, <Content_Variable>, ["AttachmentDir"]) - Description:
- Retrieve POP3 Mail.
- if AttachentDir is specified, the attachments will be saved there.
- Example:
text
POP3RETRIEVE(<Mail_index>, <Content_Variable>)POP3SETUP
- Syntax:
POP3SETUP("Host", "User Name", "User Password", [Port], [SSLMethod]) - Description:
- POP3SETUP Must be done before connecting to POP3 server
- Parameters:
- SSLMethod - (0=sslvSSLv2, 1=sslvSSLv23, 2=sslvSSLv3, 3=sslvTLSv1 (default), 4=sslvTLSv1_1, 5=sslvTLSv1_2)
- Example:
text
POP3SETUP("Host", "User", "Password")POS
- Syntax:
POS(<"string">, <"substring">), [0=Case Insensitive 1=Case Sensitive (Default = 0)]) - Description: Find a sub-string from the source string (same as FIND function)
- Example:
text
POS("string", "substring")PRINT
- Syntax:
PRINT <"text"> - Description: Popup a message on screen
- Example:
text
PRINT "Display_Message"PROCESSPAGES
- Syntax:
PROCESSPAGES(<"scope">, <"process">, [value]) - Description:
- Apply enhance process to the pages.
- Parameters:
- <"scope"> = "all", "selected", "checked"
- <"process"> see following:
- "autodeskew" = apply auto deskew
- "scale" value in percentage
- "color" (0=NA, 1=B/W, 2=256 Colors, 3=256 Grays, 4=24bit, 5=32f, 6=CMYK, 7=48Bit, 8=CIELab, 9=32bit)
- "rotate" value in degree
- "removeblank" value in minimum percentage of black
- Example:
text
PROCESSPAGES("all", "autodeskew")PROCEXEC
- Syntax:
PROCEXEC(<"Application Name">, ["Parameters"], [TimeOut(sec)], [Visibility]) - Description:
- Run an external application and return ProcessID upon success. Returns 0 if failed.
- Visibility: 0=Hide, 1=Visible (Default)
- Example:
text
lProcID = PROCEXEC("Application Name")PROCKILL
- Syntax:
PROCKILL(<ProcessID>) - Description: Kill the process. Returns True/False
- Example:
text
lRst = PROCKILL(lProcID)PROCRUNNING
- Syntax:
PROCRUNNING(<ProcessID>) - Description: Check whether the process exists Returns True/false
- Example:
text
lRst = PROCRUNNING(lProcID)PROMPT
- Syntax:
PROMPT <"text">, <Seconds> - Description: Popup a message for a number of seconds
- Example:
text
PROMPT "Display_Message", 5PCLTOTIFFS
- Syntax:
PCLTOTIFFS(<"FileName">, <"OutPath">, <"Prefix">, ["Settings"]) - Description:
- Convert PCL file to tiffs
- Returns True/False
- Example:
text
PCLTOTIFFS("FileName", "OutPath", "Prefix", "")RANDOM
- Syntax:
RANDOM(<range>) - Description: Generates random numbers within a specified range. Random returns a random number within the range 0 <= X < 99999999.
- Example:
text
RANDOM(100)REGOPEN
- Syntax:
REGOPEN(<"RootKey">, <"Key">, <AccessRight>) - Description:
- Open the registry
- <AccessRight> can be:
- 1=Open Write/Create
- 2=Open Read
- Default = 1
- Example:
text
lRegHand = REGOPEN("HKEY_CURRENT_USER", "MyKey")
IF lRegHand > 0 THEN
'-- Codes Here
REGCLOSE(lRegHand)
ENDIFREGCLOSE
- Syntax:
REGCLOSE(<RegHand>) - Description: Close registry
- Example:
text
REGCLOSE()REGNAMECOUNT
- Syntax:
REGNAMECOUNT(<RegHand>) - Description: Get the number of names available within the opened key
- Example:
text
lcnt = REGNAMECOUNT(<RegHand>)REGKEYCOUNT
- Syntax:
REGKEYCOUNT(<RegHand>) - Description: Get the number of subkeys available within the opened key
- Example:
text
lcnt = REGKEYCOUNT(<RegHand>)REGGETKEY
- Syntax:
REGGETKEY(<RegHand>, <Index>) - Description: Get key name from the specified index
- Example:
text
lkeyname = REGGETKEY(<RegHand>, 1)REGGETNAME
- Syntax:
REGGETNAME(<RegHand>, <Index>) - Description: Get value name from the specified index
- Example:
text
lname = REGGETNAME(<RegHand>, 1)REGGETSTR
- Syntax:
REGGETSTR(<RegHand>, <"ValueName">) - Description: Read Registry Key
- Example:
text
REGGETSTR(, "ValName")REGGETFLT
- Syntax:
[REGGETFLT(<RegHand>, <"ValueName">) - Description: Read Registry Key
- Example:
text
REGGETFLT(, "ValName")REGGETINT
- Syntax:
REGGETINT(<RegHand>, <"ValueName">) - Description: Read Registry Key
- Example:
text
REGGETINT(, "ValName")REGPUTSTR
- Syntax:
REGPUTSTR(<RegHand>, <"ValueName">, <Value>) - Description: Read Registry Key
- Example:
text
REGPUTSTR(, "ValName", )REGPUTFLT
- Syntax:
REGPUTFLT(<RegHand>, <"ValueName">, <Value>) - Description: Read Registry Key
- Example:
text
REGPUTFLT(, "ValName", )REGPUTINT
- Syntax:
REGPUTINT(<RegHand>, <"ValueName">, <Value>) - Description: Read Registry Key
- Example:
text
REGPUTINT(, "ValName", )RESULT
- Syntax:
RESULT = "something" - Description: RESULT is used exclusively within a function. It's a special variable that is used to return a value from a function.
- Example:
text
RESULT = 1RETURN
- Syntax:
RETURN - Description: Return from a Subroutine (obsolete use SUB/FUNC instead)
- Example:
text
RETURNRIGHT
- Syntax:
RIGHT(<text>, <no. of chars> - Description: Get Rightmost string from within the source string
- Example:
text
RIGHT(var, <Number_of_chars>)RIGHTPAD
- Syntax:
RIGHTPAD(<text>, <no. of chars>, <pad char>) - Description: Pads a string with the specified character to the right
- Example:
text
RIGHTPAD(var, <Number_of_chars>, <char_to_pad>)ROUND
- Syntax:
ROUND(<number>) - Description: Round up the decimal points
- Example:
text
ROUND(1.56)RPARSE
- Syntax:
RPARSE(<text variable>, <"delimited">, [case]) - Description:
- This function reverse-parses the <text variable> and returns the right-side portion of the <"delimited">
- Paramteres:
- [case]: 0=case sensitive, 1=Case Insensitive (default 0)
- Example:
text
RPARSE(var, "Delimiter")SAVEFORMVARS
- Syntax:
SAVEFORMVARS(<"FileName">, ["Optional_Field_Spec"], [FileFormat]) (Reform/WorkFlow Shortcut Version Only) - Description:
- SAVEFORMVARS saves the entire content of Reform Fields to a File.
- FileFormat: 0=ASCII (Default), 1=UTF8, 2=Unicode
- Example:
text
SAVEFORMVARS("default.mem")SAVECHANGES
- Syntax:
SAVECHANGES([SaveMode]) - Description:
- Save changes to file (Will also asks for a new filename if new scan).
- Paremeters:
- [SaveMode] = (Optional, default = 0) 0=Don't use settings, 1=Use settings from selected profile, 2=Use settings from script (via SETSAVEPREF())
- Returns: True=if file was modified, False=if file was not modified
- Example:
text
SAVECHANGES()SAVEPAGES
- Syntax:
SAVEPAGES(<"scope">, <"filename">, ["delete"]) - Description:
- Save pages to file based on specified scope.
- Parameters:
- <"scope"> = "selected", "checked", "all"
- <"filename"> = name of file with extension (example: "test.tiff", "test.pdf")
- ["delete"] = Optional. Specify whether to delete those pages after save.
- Returns True/False
- Example:
text
SAVEPAGES("selected", "filename")SAVETOFILE
- Syntax:
SAVETOFILE(<variable>, "FileName", [FileFormat]) - Description:
- Save the variable content to a file.
- FileFormat: 0=ASCII (Default), 1=UTF8, 2=Unicode
- Example:
text
SAVETOFILE(var, "FileName")SAVEVARS
- Syntax:
SAVEVARS(<"filename">, "[spec]", [FileFormat], [Encrypt_Seed]) - Description:
- SAVEVARS function.
- FileFormat: 0=ASCII (Default), 1=UTF8, 2=Unicode
- Example:
text
SAVEVARS("Filename", "Optional_Specs")SCRIPTDIR
- Syntax:
SCRIPTDIR() - Description: Get the directory of the active script
- Example:
text
SCRIPTDIR()SEND
- Syntax:
SEND <"Text to send"> - Description: Send a keystroke to the window in focus (See FOCUS)
- Example:
text
SEND "Text_to_send"SETCLIPBOARD
- Syntax:
SETCLIPBOARD(<"text">) - Description: Copy a string to windows clipboard
- Example:
text
SETCLIPBOARD("Text_to_set")SETDLGVAR
- Syntax:
SETDLGVAR("CompName", <CompValue>) - Description: Set Dialog Component Value
- Example:
text
SETDLGVAR("CompName", <CompValue>)SETFOCUS
- Syntax:
SETFOCUS(<Handle>) - Description: Set focus to the specified handle (see GETFOCUS(), GETFOCUSCLASS()
- Example:
text
SETFOCUS(<Handle>)SETPRIORITY
- Syntax:
SETPRIORITY([Priority]) - Description:
- Set the process priority of the running script.
- Parameters:
- <Priority> 0=Normal (defautl), 1=Below Normal, 2=Above Normal, 3=Idle, 4=Realtime, 5=High
- Returns: True/False
- Example:
text
SETPRIORITY(0)SETSAVEPREF
- Syntax:
SETSAVEPREF(<"name">, <value>) - Description:
- Set preferences for saving to file using SAVEPAGES() function.
- Parameters:
- <"name"> see the followings:
- "colorformat" (0=NA, 1=B/W, 2=256 Colors, 3=256 Grays, 4=24bit, 5=32f, 6=CMYK, 7=48Bit, 8=CIELab, 9=32bit)
- "dpi" (10 to 4000)
- "pdfcompress" (0=uncompress, 1=RLE, 2=G4FAX, 3=G3FAX2D, 4=JPEG, 5=LZW)
- "pdfpapersize" (0=A0, 1=A1, 2=A2, 3=A3, 4=A4, 5=A5, 6=A6, 7=B5, 8=Letter, 9=Legal, 10=Ledger, 11=Tabloid, 12=same as image size)
- "tiffcompress" (0=uncompress, 1=CCITT1D, 2=G3FAX1D, 3=G3FAX2D, 4=G4FAX, 5=LZW, 6=OLDJPG, 7=JPEG, 8=PACKBITS, 9=ZIP, 10=DEFLATE)
- "jpegcompress" (0-100)
- Example:
text
SETSAVEPREF("dpi", 300)SETVARBYNAME
- Syntax:
SETVARBYNAME(<"VarName">, <Value>, [Global (True/False)]) - Description: Set Variable by name as string
- Example:
text
SETVARBYNAME("VarName", "Value", True)SETWINPOS
- Syntax:
SETWINPOS(<Left>, <Top>, [Width], [Height], [Z-Position], [Visible]) - Description:
- Set Window Position.
<left>, <top>= left and top position[width], [height]= width/height (optional default-1)[z-Position]= z-layer position (optional default-1)[Visible]= window visible value (optional64= show, default;128= hide)
- Example:
text
SETWINPOS(<Left>, <Top>, [Width], [Height], [Z-Position], [Visible])SHOWIDLE
- Syntax:
SHOWIDLE(<"text">, ["Title"], [left], [top]) - Description:
- Show idle dialog.
- [left] = Left pos [top] = Top Pos
- Example:
text
SHOWIDLE("Idle")SHOWPROGRESS
- Syntax:
SHOWPROGRESS(<"text">, [mode], [left], [top]) - Description:
- Show progress dialog.
- Parameters: [mode] 0=progress, 1=perpetual (default = 1) [left] = Left pos [top] = Top Pos
- Example:
text
SHOWPROGRESS("Working")
UPDATEPROGRESS(50, "Still working")
HIDEPROGRESS()STRCHKSUM
- Syntax:
STRCHKSUM(<"string">) - Description:
- Description:
- Calculates string checksum.
- Returns:
- Checksum value
- Example:
text
STRCHKSUM("string")STRDECRYPT
- Syntax:
STRDECRYPT(<"Text">) - Description: Decrypt Text.
- Example:
text
STRDECRYPT("Text")STRENCRYPT
- Syntax:
STRENCRYPT(<"Text">) - Description: Encrypt Text.
- Example:
text
STRENCRYPT("Text")STRINGTOBYTES
- Syntax:
STRINGTOBYTES(<"string">, ["nullCharSubstitute"]) - Description:
- Converts string to byte/hex string (example: "34 12 DE 00")
- Parameters:
- <"string"> = string to convert
- ["nullCharSubstitute"] = character representing null (optional)
- Example:
text
STRINGTOBYTES("string", "nullCharSubstitute")UPDATEPROGRESS
- Syntax:
UPDATEPROGRESS(<pct>, ["message"]) - Description:
- Update the progress bar of Progress Dialog
- Parameters: <pct> = percentage complete ["message"] = progress text message
- Example:
text
UPDATEPROGRESS(50, "Still working")SMTPCONNECT
- Syntax:
SMTPCONNECT() - Description: Connect to SMTP (Must be done before sending a mail)
- Example:
text
SMTPCONNECT()SMTPDISCONNECT
- Syntax:
SMTPDISCONNECT() - Description: Disconnect from SMTP Server
- Example:
text
SMTPDISCONNECT()SMTPSEND
- Syntax:
SMTPSEND(<"From">, <"To">, <"Subject">, <"Content">, ["attachments"], [HtmlFormat]) - Description:
- Send SMTP Mail (SMTPSETUP must be called first)
- Parameters:
- "From" = From Email
- "To" = To Email
- "Subject" = Subject
- "Content" = Content
- "Attachment" = Optional. Blank for nothing (default = False)
- HtmlFormat = Optional. True/False (default = False)
- Example:
text
SMTPSEND("From", "To", "Subject", "Content", "attachments")SMTPSETUP
- Syntax:
SMTPSETUP("Host", [User], [Password], [Port], [SSLMethod]) - Description:
- Setup SMTP Server (Must be done before sending a mail)
- Parameters:
- SSLMethod - (0=sslvSSLv2, 1=sslvSSLv23, 2=sslvSSLv3, 3=sslvTLSv1 (default), 4=sslvTLSv1_1, 5=sslvTLSv1_2)
- Example:
text
SMTPSETUP("Host")SORTTEXT
- Syntax:
x = SORTTEXT(<"Text">) - Description: Sort the multi-line text
- Example:
text
SORTTEXT("Text")STR
- Syntax:
STR(<number>) - Description: Converts Number to string
- Example:
text
STR(var)STRING
- Syntax:
STRING..ENDSTRING - Description: Assign large/multi-line text to a variable.
- Example:
text
STRING s
Text Line 1
Text Line 1
ENDSTRINGSTRREPLACE
- Syntax:
STRREPLACE(<"string">, <"look for">, <"replace with">) - Description: Find and Replace text content
- Example:
text
STRREPLACE(var, "To_Look_For", "Replace_With")STRVALGET
- Syntax:
STRVALGET(<"string list">, <"name">, ["default value"]) - Description:
- Retrieve the value from name.
- Returns value.
- Example:
text
s = STRVALGET(lstrlist, "name")STRVALNAMES
- Syntax:
STRVALNAMES(<"string list">) - Description:
- Get just the names from string list.
- Returns the names
- Example:
text
s = STRVALNAMES(lstrlist)STRVALSET
- Syntax:
STRVALSET(<"string list">, <"name">, <"value">) - Description:
- Update the string list.
- Returns the string list
- Example:
text
lstrlist = STRVALSET(lstrlist, "name", "value)SUB
- Syntax:
SUB..ENDSUB - Description: Create Subroutine block
- Example:
text
'-------------------------------------------------------------------------------
SUB
'-- Codes
ENDSUBSYSBREAK
- Syntax:
SYSBREAK - Description: SYSBREAK is used for setting a breakpoint programmatically.
- Example:
text
SYSBREAKSYSCMD
- Syntax:
SYSCMD <action> - Description:
- Send standard system command to the currently focused window.
- Available commands: close, restore, minimize, maximize, shutdown, reboot
- Example:
text
SYSCMD closeSYSDIR
- Syntax:
SYSDIR(<"name">) - Description:
- Retrieve system specific folder.
- Available names: home, temp, script, resource
- Example:
text
s = SYSDIR("home")SYSINFO
- Syntax:
SYSINFO(<"type">) - Description:
- Get system-related information.
- Available types: "user", "computer"
- Example:
text
= SYSINFO("user")TODBSTR
- Syntax:
TODBSTR("String") - Description: Strip out Unqualified string
- Example:
text
TODBSTR("string")TEMPDIR
- Syntax:
TEMPDIR() - Description: Get windows temporary directory (will be padded with "")
- Example:
text
TEMPDIR()TEMPLATE
- Syntax:
TEMPLATE(<"Template FileName">, <"Output Filename">, [FileFormat]) - Description:
- Converts a template file into a new file.
- FileFormat: 0=ASCII (Default), 1=UTF8, 2=Unicode
- Example:
text
TEMPLATE("Template_Filename", "Output_FileName")TEMPLATEVAR
- Syntax:
TEMPLATEVAR(<Filename">) - Description: Converts a template file into a variable.
- Example:
text
TEMPLATEVAR("Template_Filename")TEXT
- Syntax:
TEXT block - Example:
text
TEXT s
Text Line 1
Text Line 1
ENDTEXTTICKCOUNT
- Syntax:
TICKCOUNT() - Description: Return value is the number of milliseconds that have elapsed since the system was started
- Example:
text
TICKCOUNT()TIME
- Syntax:
TIME([12/24 or time format string]) - Description:
- Get Current time (default to AM/PM format based on local setting)
- Time Format String:
- "hh:nn:ss"
- "hh:nn am/pm"
- Example:
text
TIME(12)TRIM
- Syntax:
TRIM(<"text">) - Description: Trims spaces from both sides of a string
- Example:
text
TRIM(var)TRUNC
- Syntax:
TRUNC(<number>) - Description: Truncate the decimal points
- Example:
text
TRUNC(var)UNIQUEFILE
- Syntax:
UNIQUEFILE(<"FileName">, [IncrementFileExtension (True/False)], [StartingNumber]) - Description: Get the unique file name
- Example:
text
UNIQUEFILE("")UNIQUENAME
- Syntax:
UNIQUENAME([Compressed], [DefaultValue]) - Description:
- Get unique name based on date/time.
- [Compressed] = 0 or 1 (0 is assumed if omitted)]
- [DefaultValue] = Use this value instead.
- Example:
text
UNIQUENAME()UPPER
- Syntax:
UPPER(<"text">) - Description: Converts a string to upper case
- Example:
text
UPPER("")VAL
- Syntax:
VAL(<"string">, [default]) - Description:
- Converts string to number.
- Parameters: [default] = default value (example: 4)
- Example:
text
VAL("", 0)VARBYNAME
- Syntax:
x = VARBYNAME(<"Variable Name">) - Description: To retrieve the content of a variable by its name as string.
- Example:
text
VARBYNAME("Variable_Name")WAITDOS
- Syntax:
WAITDOS(<Row>, <Col>, "Text_to_wait", <Timeout_in_seconds>) - Description: Wait for text to appear at row/col of the DOS Window
- Example:
text
WAITDOS(<Row>, <Col>, "Text_to_wait", 10)WAITFILELOCK
- Syntax:
WAITFILELOCK(<"FileName">, <TimeOut>) - Description:
- Wait for a file to be unlocked
- <TimeOut> in Seconds
- Example:
text
WAITFILELOCK(<"FileName">, 10)WAITFORFILE
- Syntax:
[WAITFORFILE(<"FileName">, <TimeOut>) - Description:
- Wait for a file to be created
- <TimeOut> in Seconds
- Example:
text
WAITFORFILE(<"FileName">, 10)WAITWIN
- Syntax:
WAITWIN("Window Title, "Text", <Timeout>) - Description:
- Wait for text to appear within the Window
- <TimeOut> in Seconds
- Example:
text
WAITWIN("Window_Title", "Text_to_wait", 10)WHILE
- Syntax:
WHILE (condition) .. ENDWHILE - Description: While Loop is used for looping with condition
- Example:
text
WHILE i = 0
'-- Codes
ENDWHILEWIZARD
- Syntax:
WIZARD..ENDWIZARD - Description:
- Wizard Code Block
- In the built-in editor, place the cursor on the
WIZARDkeyword, right-click, and chooseWizard Editorto open the visual wizard designer for the entire highlighted wizard block. - Parameters:
- WIZARD ["Title"= ""
- Example:
text
WIZARD "Wizard", 500, -1, True
*Form
Name=page1
Caption=Page 1
Desc=Hello, World
*EDIT
Name=edtNam
Caption=Edit
Value=
Required=0
*END
ENDWIZARDWIZARDSEL
- Syntax:
WIZARDSEL(<"control name">) - Description: Get the list of selections from Combo, ListBox, EnListBox
- Example:
text
WIZARDSEL("E1")WIZARDVAR
- Syntax:
WIZARDVAR(<"control name">) - Description: Retrieve the value of a Wizard Variable
- Example:
text
WIZARDVAR("E1")SHOWFIELD
- Syntax:
SHOWFIELD(<"objname">) - Description: Show an Object
- Example:
text
SHOWFIELD("")HIDEFIELD
- Syntax:
HIDEFIELD(<"objname">) - Description: Hide an Object
- Example:
text
HIDEFIELD("")MOVEOBJ
- Syntax:
MOVEOBJ(<"Layer (D or T)">, <"objname">, <Left>, <Top>) - Description: Move an Object
- Example:
text
MOVEOBJ("D", "objname", 1.2, 1.3)SIZEOBJ
- Syntax:
SIZEOBJ(<"Layer (D or T)">, <"objname">, <Width>, <Height>) - Description: Resize an Object
- Example:
text
SIZEOBJ("D", "objname", 1.2, 1.3)ADDOBJ
- Syntax:
ADDOBJEX(<"Layer (D or T)">, <"ObjectType">, <"objname">, <Value>, <Left>, <Top>, [Width], [Height]) - Description:
- Add a new Object
- Available Types: "shape", "tagdoc", "paragraph", "image"
- Example:
text
lnewname = ADDOBJEX("D", "ObjectType", "objname", "Hello", 1.0, 1.0)GETOBJDIM
- Syntax:
GETOBJDIM(<"Layer (D or T)">, <"objname">, <"(L, T, W, H)">) - Description: Get Object Dimension Info
- Example:
text
GETOBJDIM("D", "objname", "L")GETOBJPROPEX
- Syntax:
GETOBJPROPEX(<"objname">, <"PropName">) - Description: Get Object Property Value
- Example:
text
GETOBJPROPEX("objname", "color")SETOBJPROPEX
- Syntax:
SETOBJPROPEX(<"objname">, <"PropName">, <Value>) - Description: Set Object Property
- Example:
text
SETOBJPROPEX("objname", "color", 2423432)GETOBJVAL
- Syntax:
GETOBJVAL(<"objname">) - Description: Get Object default value
- Example:
text
GETOBJVAL("objname")SETOBJVAL
- Syntax:
SETOBJVAL(<"objname">, <"Text">) - Description: Set Object default value
- Example:
text
SETOBJVAL("objname", "Hello")DELETEOBJ
- Syntax:
DELETEOBJ(<"objname">) - Description: Delete Object
- Example:
text
DELETEOBJ("objname")ADDLOOKUP
- Syntax:
ADDLOOKUP(<"ObjName">, <"LookupContent">) - Description:
- ADDLOOKUP(<"ObjName">, <"LookupContent">)
- Only apply to Viewer Mode
- Example:
text
ADDLOOKUP("ObjName", "LookupContent")SERVICE
- Syntax:
service - Description: Create Service Block
- Example:
text
'-------------------------------------------------------------------------------
'DISPLAYNAME=Service Display Name
'DELAYSTART=4000
'OUTPUT=output.log
'ERROR=output.err
'VERBOSE=0
'-------------------------------------------------------------------------------
'-- Call initialize() once
Initialize()
'-- Your Main Program Loop
WHILE 1=1
'-- Your Monitoring codes
ENDWHILE
'-------------------------------------------------------------------------------
' Required if you want to have a setup option
'-------------------------------------------------------------------------------
SUB Setup
Initialize()
'-- Your Codes
'-- On confirm then save
SAVEVARS(gVarFile, "gUsr")
ENDSUB
'-------------------------------------------------------------------------------
SUB Initialize
_endoncancel = False
GLOBAL gVarFile
'-- Must be static
gVarFile = HOMEDIR() + "VarFile.var"
GLOBAL gUserVar
GLOBAL gUserVar1
'-- Try loading the vars
LOADVARS(gVarFile, "gUsr_")
'-- If loaded for the first time then initialize it with some values
IF gUsrVar = "0" THEN
gUsrVar = "value"
gUsrVar1 = "value"
'-- Save the initialized vars
SAVEVARS(gVarFile, "gUsr")
ENDIF
ENDSUBWRKCOMMAND
- Syntax:
WRKCOMMAND(<"Command">, <Value>) (Workflow Shortcut Version Only) - Description:
- Allows you to load/save workflow, add/delete component, toggle workflow modified.
- Commands:
- "load" Load workflow
- "save" Save workflow (blank to prompt for one or use the current)
- "modified" Toggle workflow modified so it will prompt to save changes
- "add" WorkFlowName Add a new work flow component. Returns the new name of component
- "delete" ComponentName Delete the component from workflow
- Example:
text
WRKCOMMAND("Command", Value)DELETEPROP
- Syntax:
DELETEPROP(<"Name">) (Workflow Shortcut Version Only) - Description: Delete user-define property
- Example:
text
DELETEPROP("Name")GETCONNECTIONS
- Syntax:
GETCONNECTIONS(<"Input/Output">, ["ComponentName"], "], ["QualifyPrefix"]) (Workflow Shortcut Only) - Description: Get the input or output component(s) that are connected to the current component. Leave ComponentName blank for all the inputs or all the outputs
- Example:
text
GETCONNECTIONS("Input")GETRFMOBJDIM
- Syntax:
GETRFMOBJDIM(<"Layer (D/T)">, <"FieldName">, <"Dim (L/T/W/H)">) (Workflow Shortcut Version Only) - Description: Save the changed form.
- Example:
text
GETRFMOBJDIM("T", "FieldName", "L")LOADFORM
- Syntax:
LOADFORM(<"FormName">, ["TextFileName"]) (Workflow Shortcut Version Only) - Description: Load Reform form and optionally loads accompanying text file.
- Example:
text
LOADFORM("FormName", "TextFileName")PROPEXISTS
- Syntax:
PROPEXISTS(<"Name">) (Workflow Shortcut Version Only) - Description: Check whether user-defined property exists.
- Example:
text
PROPEXISTS("Name")SEARCHFILE
- Syntax:
SEARCHFILE(<"Path">, <"FileSpecs">, [StopWhenFound]) - Description:
- Recursively search for a file. Returns the list of files.
- Parameters: <"FileSpecs"> = "*.txt", [StopWhenFound] = True/False (Default is True)
- Example:
text
SEARCHFILE("c:\temp", "*.txt")SAVEFORM
- Syntax:
SAVEFORM(<"FileName">) (Workflow Shortcut Version Only) - Description: Save Reform Form to file
- Example:
text
SAVETOFILE("FormName")SNMPCONNECT
- Syntax:
SNMPCONNECT(<"server">, ["community"], [TimeOut], [Port], [TrapPort]) - Description:
- Connect to SNMP server.
- Parameters: <"server"> = name of the server, ["community"] = optional (default is "public"), [TimeOut] = optional timeout value in millisecs. (default is 1000), [Port] = optional (default is 161), [TrapPort] = opitonal (default is 162)
- Returns Handle
- Example:
text
lhand = SNMPCONNECT("179.0.0.1")
IF lhand 0 THEN
SNMPGET(lhand, "1.0.0.0.0")
SNMPDISCONNECT(lhand)
ENDIFSNMPDISCONNECT
- Syntax:
SNMPDISCONNECT(<handle>) - Description: Disconnect from SNMP
- Example:
text
SNMPDISCONNECT(lhand)SNMPGET
- Syntax:
SNMPGET(<handle>, <"MIB mask">) - Description:
- Get MIB value
- Parameters: <Handle> = valid handle, <"MIB mask"> = MIB mask to retrieve
- Example:
text
s = SNMPGET(lhand, "1.3.6.1.2.1.1.1.0")SNMPLIST
- Syntax:
SNMPLIST(<handle>, <"MIB mask">) - Description:
- List MIB values under this mask
- Parameters: <Handle> = valid handle, <"MIB mask"> = MIB mask to retrieve
- Returns the list of value ("MIB=value")
- Example:
text
s = SNMPLIST(lhand, "1.3.6.1.2.1.1")READPROP
- Syntax:
READPROP(<"Name">, [DefaultValue]) (Workflow Shortcut Version Only) - Description: Read user-defined property
- Example:
text
READPROP("Name", 1)UNZIP
- Syntax:
UNZIP(<"ZipFile">, <"OutDir">) - Description:
- Unzip the zip file to the destination. This will unzip the whole structure of the zip.
- Parameters:
- <"ZipFile"> = name of the zip file
- <"OutDir"> = destination directory (must exists)
- Returns:
- True/False
- Example:
text
UNZIP("ZipFile", "OutDir")VERSION
- Syntax:
VERSION() - Description:
- Description:
- Report the version of the script engine.
- Example:
text
VERSION()WRITEPROP
- Syntax:
WRITEPROP(<"Name">, <Value>) (Workflow Shortcut Version Only) - Description: Write/Create user-defined property
- Example:
text
WRITEPROP("Name", Value)