callXCMD

Syntax callXCMD (addrXCMD [, value1 [..., valueN]])

Params addrXCMD is the address of a binary value containing the XCMD or XFCN code.

value1 through valueN are string parameters to be passed to the XCMD. Up to 16 parameters values may be provided, or none at all.

Action executes the XCMD or XFCN code stored in the binary value at addrXCMD, passing it the parameter values provided.

Returns The string value returned by the XCMD.

If the code at addrXCMD is an XCMD, and it doesn't return a value, callXCMD returns true.

If the code at addrXCMD is an XFCN, and it doesn't return a value, callXCMD returns the empty string.

Examples callXCMD (@syslargestblock.code)
» 1310K

callXCMD (@ARA.hyperConnect, "System:Utilities:ARA Login", false)
» The Modem Port is currently in use by Navigator 3.1.1. «an error occurred

Platform Notes This verb is only implemented in the Mac OS version of Frontier.

Notes The binaryType of the value at addrXCMD must be either 'XCMD' or 'XFCN'.

Frontier supports the following standard XCMD callbacks:

EvalExpr

SendCardMessage

SendHCMessage

GetGlobal

SetGlobal

ZeroBytes

ScanToReturn

ScanToZero

StringEqual

StringLength

StringMatch

ZeroTermHandle

BoolToStr

ExtToStr

LongToStr

NumToHex

NumToStr

PasToZero

PointToStr

RectToStr

ReturnToPas

StrToBool

StrToExt

StrToLong

StrToNum

StrToPoint

StrToRect

ZeroToPas

SendHCEvent

These represent all of the HyperTalk Utilities except for RunHandler, and all of the String Utilities and String Conversions. In addition, the HyperCard 2.0 SendHCEvent callback is supported.

When using EvalExpr, SendCardMessage, or SendHCMessage, the message or expression must be a valid UserTalk script. All three of these callbacks execute the script; only EvalExpr returns the result.

When getting or setting a global, any value in the current script's scope can be named. If SetGlobal is called with a name that isn't defined and isn't a dotted database path, the value is placed in the scratchpad table. If GetGlobal is called with a

name that isn't defined, an error is returned.

See Also appleEvent

launch.resource

Discuss