PerfectScript Macro Programming Language Commands

J. Dan Broadhead



This document lists the macro programming language commands, including both product commands of the macro system and builtin programming commands.



( ) = Change made in interim release
D = Documentation change only
N = New
n = new but not documented
C = Changed
c = changed but not documented
O = Obsolete
o = part (not all) of this command is obsolete
R = Removed
r = part (not all) of this command was removed

Operators Misc A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ?
Please wait...



Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
/* */ (comment)






N
C

// (comment)
N









NOT (relational compilment)
N


c





~ (bitwise compliment)


N
c





+ (unary)
N


c





- (unary)
N


c





** (power)




N





^^ (power) works



n





\ (root)

works



n





* (multiplication)
N


c





/ (floating division)
N


c





% (floating modulus)
N


c





DIV (integer division)
N


c





MOD (integer modulus)
N


c





+ (addition)
N


c





+ (concatenation)
N









- (subtraction)
N


c





- (reduction)




N





<< (shift left)


N
c





>> (shift right)


N
c





Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
<<< (rotate left)




N





>>> (rotate right)




N





= (equality)
N


C





== (equality) works





n



!= (inequality)



n NC





<> (inequality)
N


C





>< (inequality) works

n
c





< (less than)
N


c





<= (less than or equal to)
N


c





> (greater than)
N


c





>= (greater than or equal to)
N


c





IN (membership)




N
C



LIKE (case insensitive equality)




n
N



USING (formatting) not implemented



n





& (bitwise AND)


N
c





| (bitwise inclusive OR)


N
c





^ (bitwise inclusive OR)


N
c





AND (relational AND)
N


c





OR (relational inclusive OR)
N


c





XOR (relational exclusive OR)
N


c





Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
:= (assignment)
N









= (assignment)



N






:=: (swap) not implemented



n






Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
; (parameter separator)
N









. (prefix / command separator)
N









.. (default app / object prefix)






N



.. (array slice indexes)




N





... (array literal, open ended)




N





{ } (array literal)


n? n? N





{ } (repeating parameter group)
N









( ) (parameter list)
N









( ) (expression)
N









' ' (character literal)


N







" " (string literal)
N









# (variable terminator)
N









@ (label terminator)
N
C







! (enumeration terminator)
N









: (label definition terminator)


n? n?




N
: (parameter name / value sep)
N









b (binary numeric terminator)


N







Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
o (octal numeric terminator)


N







h (hex numeric terminator)


N







x (hex numeric terminator)


N







w (wpus unit terminator)
N









c (centimeters unit terminator)
N









m (millimeters unit terminator)
N









i (inches unit terminator)
N









" (inches unit terminator)
N









p (points unit terminator)
N









& (address)


N


c C


[ ] (array index)

N






C
[..] (array slices)




N



C
[0] (array element count)




N

c


[MacroEnd]






N
C

[MacroStart]




N


C

[SortCompareRoutine] not implemented





n




Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
AbsVal




N





acos




N





acosh




N





Address
N




c C


Amortize









N
Animate









N
AnsiString


N


c C


AppActivate

N

C
C



AppClose




N
C



AppExecute

N

C





AppExecuteExt


N
C


O

Application
N
C
C





AppLocate

N C
C
C
C

AppShow




N
C



asin




N





asinh




N





Assert


N
C C

c C
AssertCancel
N
O







AssertError
N
O







AssertNotFound
N
O







Assign
N




O



atan




N





atan2




N





atanh




N





Average




N






Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
Beep
N




C



BIFFilePath


N
C



O
BIFInfo


N
C



O
BIFRead


N
C



O
BIFWrite


N
C



Oc
BinaryPack




N



C
BinaryUnPack




N





Bool


N


c C


Boolean






n N


Break


C







By works





n



Byte






n N


ByteLen
N
R







BytePos
N
R








Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
Call
N
C







CallbackResume




N





CallbackWait




N





Cancel


N
C
c
c

CancelOff
N
O







CancelOn
N
O







Case
N









Case Call
N









CaseOf


N







Ceiling




N





Chain
N

C






CharLen


N







CharPos


N
C





CheckSum









N
ClipboardGet not implemented





n



ClipboardPut

not implemented





n



CloseFile



N






CoachAnimate


N


O



CoachFilterAdd


N
o
O

R
CoachFilterDestroy


N


O

R
CoachFilterDisable


N


O

R
CoachFilterEnable


N


O

R
CoachGetRegionInfo


N


O

R
CoachInputControl



N

O

R
CoachMessageBox


N
O





CoachMessageBoxClose


N


O



CoachMessageBoxEx




N
O



CoachPrompt


N


O



CoachPromptClose


N


O



CoachRegister




N
O

R
CoachRemoveDialogFilter


N


O

R
CoachSetDialogFilter


N


O

R
CoachWaitForInputIdle




n
o

R
Combinations works







n c
CompileMessage works





n



Condition




N C c
c C
Constant




N





Constants




N





Continue


N







ConvertType




N
C



CopyFile



N






cos




N





cosh




N





CreateDirectory



N






CreateObject






N



CToN


N







CubeRoot




N





Currency






n N



Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
Date






n N


DateAddDays






N



DateAddMonths






N



DateAddWeeks






N



DateAddYears






N



DateAndTime




N
C



DateDay




N
C



DateDayOfYear






N



DateDaysInMonth






N



DateDaysInYear






N



DateIsLeapYear






N



DateMonth




N
C



DateMonthName




N
C



DateOfMonthEnd






N



DateOfNthDay






N



DateOfNthWeek






N



DateOfNthWeekday






N



DateString




N
C
Cc

DateStringParse not implemented





n



DateWeekday




N
c



DateWeekdayName




N
c



DateWeekOfYear






N



DateYear




N
c



DDEExecute

N






C
DDEExecuteExt


N





Oc
DDEInitiate

N

C



C
DDEPoke

N




(c) C

DDERequest

N C



(c) C

DDETerminate

N






C
DDETerminateAll

N








Declare

N C







Declare DLLCall Prototype works

n







Declare Function

works

n







Declare Function Prototype

works

n







Declare Procedure

works

n







Declare Procedure Prototype

works

n







DeclareLocal

works

n







Declare Global

works

n







Declare Persist

works

n







Default


N







DefaultUnits
N
C
C


C

Define works



n





DegreesToRadians




N





DeleteDirectory



N






DeleteFile



N






DialogAddBitmap




N


C C
DialogAddCheckBox

N



C
C

DialogAddColorWheel

N



C



DialogAddComboBox

N



C
o C
DialogAddControl


N


C C


DialogAddCounter

N

C
C



DialogAddDate




N
C



DialogAddEditBox

N



C



DialogAddFileNameBox

N

o
C



DialogAddFrame

N



C



DialogAddGroupBox

N



C



DialogAddHLine

N



C



DialogAddHotSpot

N



C



DialogAddIcon

N



C



DialogAddListBox

N



C



DialogAddListItem

N



C



DialogAddPopupButton

N



CO



DialogAddProgress




N
C



DialogAddPushButton

N



C



DialogAddRadioButton

N



C



DialogAddScrollBar

N



C

C
DialogAddText

N



C



DialogAddViewer

N



C



DialogAddVLine

N



C



DialogControlQuery






N



DialogControlUpdate






N



DialogDefine

N

C
C



DialogDelete






n N


DialogDestroy

N



C



DialogDismiss



N

C



DialogDisplay

N

O
c



DialogHandle


N
C





DialogLoad




N





DialogSave




N





DialogSendMessage not implemented
n








DialogSetProperties




N
C



DialogShow



N C
C



DialogUndisplay


N
O
c



Dimensions



N

C



Discard


N


C



DLLCall
N
C


C



DLLCall Prototype



N

C



DLLFree
N







C
DLLLoad
N
c
C



C
DoesDialogExist




N





DoesDirectoryExist



N






DoesFileExist



N






DoesRegionExist






N



Double






n N


DoubleFactorial works



n





DWord


N


c C



Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
Each works





n



Else
N









ElseIfPlatform




n
Nc Cc Cc Cc
End works





n



EndApp
N


C
C

c
End Appliction works





n



EndFor
N







c
EndFor works





n



EndFunc


N





c
EndFunction


n
N


D c
End Function works





n



EndIf
N







c
End If works





n



EndIfPlatform


N
C
Cc Cc Cc Cc
EndObject









N
End Object works








n
EndProc


N





c
EndProcedure


n
N


D c
End Procedure works





n



EndPrompt
N









EndSwitch


N





c
End Switch works





n



EndWhile
N







c
End While works





n



EndWith






N

c
End With works





n



EnvVariableGet



n N


o

EnvVariableSet



n N


o

Error


N
C
c
c

ErrorNumber
N


C
C
c C
ErrorOff
N
O







ErrorOn
N
O







ExecuteToken works








n
Exists


N


Co



ExitHandlerState





N c
c

ExponentPart




N






Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
Factorial




N





False
N









Fibonacci




N





FileCheckSum works







n N
FileConvert






N
Cc Cco
FileConvertError






N
Cc c
FileError



N




C
FileFind



N


Co


FileFlushData









N
FileIsEOF



N






FileNameDialog




N
C C o C
FilePosition



N




C
FileRead



N




C
FileSize



N




C
FileTruncate



N




C
FileType






N

C
FileTypeExtension






N

C
FileTypeList






N

C
FileTypeName






N

C
FileWrite



N




C
FileWriteLine









N
Floor




N





For
N





c c c
ForEach
N




C c c

For Each works





n



ForNext


N



c c c
For Next works





n



Fraction
N
C







FractionalPart




N





FractionStr




N





Function


N







Function Prototype



N







Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
gcf




N





GetCurrentDirectory



N






GetFileAttributes



N C

co


GetFileDateAndTime



N C



C
GetNumber
N






C C
GetObject






N



GetString
N






C C
GetUnits
N






C C
Global


N







Go
N









GoOnline





N





Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
HiWord
N


O






Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
If
N









IfPlatform


N
C
Co Cc Cc Cc
Include




N?





Indirect


N


C



INIRead works








n

INIWrite

works








n
Integer
N
C


c C


IntegerPart




N






Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
Label
N









lcm




N





lg




N





ln




N





Local


N







log




N





logn




N





Long






n N


LoWord
N


O






Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
MacroArgs[]



N






MacroCompile







N C c
MacroDialogResult

N



C



MacroInfo




N C C C Cc c
MacroIsCompiled







N


MacroPlay







N Cc

MantissaPart




N





Max




N





MaxN









N
MeanDev








n cN
Median









N
Menu
N







C
MenuList


N




O c
MessageBox


N


C

C
Metaphone works - English



n





Min




N





MinN









N
MMPlay


N
C





MMSpeak


N







MMSpeakClipboard


N







MMStopPlay




N





MMStopSpeech


N








Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
NameOf works





n



Nest


N C






NetAddConnection




N


Cc

NetCancelConnection




N





NetConnectionDlg




N


Cc

NetDisconnectDlg




N


Cc

NetGetConnection




N





NetGetUniversalName




N





NetGetUser




N





NewDefault
N


C
C



Next


N







NotFound


N
C
c
c

NotFoundOff


O







NotFoundOn


O







NthRoot




N





NToC


N




C

NumStr
N
C








Name Notes 5.1 5.2 6.0 6.1 7.0 7P 8.0 8P 8E 9 9P 10
Object






N C


ObjectInfo






N



OemString


N


c C


OnCancel
N


C





OnCancel Call
N


C





OnCondition




N C

c C
OnCondition Call




N C

c C
OnDDEAdvise Call


N
C





OnError
N


C





OnError Call
N


C





OnExit





N




OnNotFound
N


C





OnNotFound Call
N


C





OnTimer works







n