Functions¶
- copyArray(destArr, srcArr, isDeep)¶
- system(args)¶
execute a shell command and return the exit status
- systemString(command)¶
Execute Unix command, return the entire output as a single string
- systemArray(variable, command)¶
Execute Unix command, and break its output into lines. variable will contain this array of the resulting strings.
- process¶
- A process is an object
- in:out:pid:cmd:you can write to stdin of process with fprintfwhen process writes it generates an event
- killPipe(theProcess)¶
thePipe
- readWritePipe(cmd)¶
- theProcess = readWritePipe(cmd);Execute cmd in a new process. Return a process objectGenerate event for each line of output from theProces.Generate event when process terminates?fprintf(theProcess) sends results to standard input of theProcessfclose(theProcess) closes the standard input of theProcesskill(theProcess) kills theProcess
- Return a proc object. Fields:
pid: process id of new process
- fileDate(name[, arg])¶
Returns a string with the file’s modification date, or empty string if file not found
If arg is “m”, return modification date (default)If arg is “c”, return creation dateIf arg is “a”, return access date
- readPipe(cmd)¶
Executes Unix command cmd and generates an event for each line from the command’s standard output. When the command terminates, sends an event with type “eof”.
- metro(name[, args...])¶
args: repeat, single(default)
- float(arg)¶
convert arg to float if possible, otherwise 0.0
- int(arg)¶
convert arg to int if possible (arg is float or string), otherwise 0.
- string(arg)¶
return a string representation of arg
- csvRead(var, path)¶
set var to a two-dimensional array containing data from csv file at path
set global variable verboseCsv to 1 for debugging typeout, 2 for much more typeout
- csvWrite(var, path)¶
write two-dimensional array var to file at path
set global variable verboseCsv nonzero for debugging typeout
- readFile(var, path)¶
Read text file at path, breaking it into an array of strings (using line breaks as seperator) and assign this array to the variable var.
- writeFile(var, path)¶
Write text file to path. var is the array of strings to be written. Each element in var will be followed by a newline.
- readSoundFile(path, channelArray)¶
Read sound file path and store it in an array of channels. Assign this array to the variable channelArray. Each channel is a floating point array of samples between 0 and 1. len(channelArray) will be the number of channels and if len(channelArray) is nonzero len(channelArray[0]) will be the number of samples.
- nameFromOpenPanel([title[, text]])¶
Opens a macOS file browser window with title title and additional message text and returns the path of the chosen file, or the empty string if user cancels the dialog.
- assocKeyAtIndex(assocArray, index)¶
Returns the key at index index of assocArray
- assocElemAtIndex(assocArray, index)¶
Returns the value at index index of assocArray.
- Do not use. Use instead:
- key = assocKeyAtIndex(assocArray, index);value = assocArray.(key);
- setAssocRef(assocArray, key, UIE)¶
Make the expression assocArray.key refer directly to UIE. The statement assocArray.key = UIE; will put a copy of UIE into assocArray.key.
- assocSummary(assocArray)¶
Returns a string with a summary of the contents of assocArray
- len(arg)¶
If arg is a string, return the number of characters. If arg is an array, return the number of elements. Otherwise return 0.
- typeof(arg)¶
Returns a string describing the type of arg, one of “int”, “float”, “string”, “array”, “assoc”, “NULL”, “OP”, “LEX”, “BIN”, “IARR”, “FARR”, “SARR”, “SYM”
- atomType(arg[, noeval])¶
Returns a string describing the type of the atom arg based on the aflags field, one of “NULL”, “OP”, “LEX”, “BIN”, “string”, “IARR”, “FARR”, “SARR”, “array”, “assoc”, “SYM”
If noeval is nonzero, arg will not be evaluated.
- getField(arg, "description")¶
Returns the description field of atom arg, if there is one
- addUie(container, uie);
Adds uie to container
- unlinkUie(container, uie);
Unlinks UIE and subviews from NS view hierarchy
- setFrame1()¶
set the frame of a UIE
- refresh()¶
force user interface to update itself
- redraw()¶
force immediate redrawing of a UIE (CURRENTLY A NO-OP)
- findstrindex(theString, lookingFor)¶
Return the index of the first occurrence of string lookingFor in theString, otherwise -1.
- floatingButton(container[, text])¶
- Create a floating button labelled text, constrained in container.
- floating attributes:x.moveFloatingUie = { x, y }x.dragStyle0: black square in upper left1: whole button5: drag disabledx.dragColor = color, color of draggable part of buttonx.dragEnable integer, nonzero enables dragx.floatWidth must be set explicitly in .psi programx.floatHeight must be set explicitly in .psi programx.floatX x position of floating thingx.floatY y position of floating thing
- util("currentFullScreenWindow")¶
If any windows are in full screen mode, return the first one found, otherwise return NULL.
- util("trace", remark)¶
Prints a call trace with remark (default: “trace”). Used when debugging to trace calls to one of your routines
- util("set", "arg", value)¶
- util("get", "arg")¶
- Set or get internal values. Mostly for debugging. Values for arg:
- hideFloatingwarnDeprecatedwarnIgnoredUieMsgtraceUieWarningslegacyflippedwarnUpperCaseUieAttributes
- util(command, thing, options)¶
Commands
dumpExecImage
dumpExecModule
dumpBinStack
dumpDataStack
dumpAll
dumpParseSymTab
hideConsole
trace
atomNumber
Options
verbose
noeval
descrBeforeEval
descrAfterEval
- description(id[, modifier])¶
Return a text description of id. Values for modifier:
raw
deref
eval
evalowner
verbose
The following link: test page is a link to another page