The FooDoo Lounge

Satimage 2.6.2 Dictionary

Copyright 2004 Satimage-software.

Index

  1. Satimage text Additions
  2. Satimage files Additions
  3. Satimage utilities Suite
  4. Resource Suite
  5. Mathematical functions
  6. Arrays

Satimage text Additions: mailto:support@satimage-software.com

Events:

change: replace all occurrences of a substring

change plain text -- the substring to search for (or a result of re_compile for advanced use of regexp)

into plain text -- the replacement string

in anything -- a string or an alias

[starting at integer] -- default: 0

[case sensitive boolean] -- default true

[regexp boolean] -- default false

[whole word boolean] -- only without regexp. default false

[regexpflag a list of plain text] -- default {"EXTENDED","NEWLINE"}

Result: anything -- the new string if the "in" parameter is a string, otherwise the list {number of hits, offset of the last replace}

convert to Mac: converts a Windows string into a Mac string

convert to Mac plain text -- the original string

Result: plain text -- the converted string

convert to Windows: converts a Mac string into a Windows string

convert to Windows plain text -- the original string

Result: plain text -- the converted string

extract string: extract a substring out of a string. Same as AppleScript's expression "text i thru j of s".

extract string plain text -- the original string

[from integer] -- index of the first character. Default: 1. Negative numbers index characters backwards.

[to integer] -- index of the last character. Default: -1. Negative numbers index characters backwards.

Result: plain text -- the substring

find text: find text literally or using regular expression syntax.

find text plain text -- the substring (or regular expression) to search for (or a result of re_compile)

in plain text -- a string or an alias

[starting at integer] -- default: 0

[case sensitive boolean] -- default true

[regexp boolean] -- use regular expression, default false

[whole word boolean] -- only without regexp. default false

[regexpflag a list of plain text] -- a subset of {"EXTENDED","NEWLINE"}; default {"EXTENDED","NEWLINE"}

[using plain text] -- the pattern to generate the string (regexp). Useful for constructs with backward references in regexp, ex.: using "name: \\1". May be a list of strings, in this case matchResult is a list of strings.

[all occurrences boolean] -- returns a list of all occurrences. Default: false

[string result boolean] -- return only the matching string instead of the whole record

Result: record -- {matchLen: length of the match, matchPos: offset of the match, matchResult: the matching string (possibly formatted according to the "using" parameter)}

format: format a real number using a specification string. Ex: format pi into "##.##"->"3.14". "0" instead of "#" forces trailing zeros. "^" adds a space. "+f1;-f2;f3" provides formats for numbers >0, <0, =0. Encapsulate custom strings with "'".

format real -- the number

into plain text -- the formatting string, using #,^,O,.,%,',(,),+,-

[underflow test boolean] -- switch to scientific format if the number is too small with respect to the formatting string (default: false)

Result: plain text -- the formatted number

lowercase: move to lowercase.

lowercase plain text -- the original string

Result: plain text -- the lowercase string

re_compile: compile a regular expression

re_compile plain text -- the regular expression

[case sensitive boolean] -- default true

[regexpflag a list of plain text] -- a subset of {"EXTENDED","NEWLINE"}; default {"EXTENDED","NEWLINE"}

Result: re_pattern -- an opaque pattern which may be used as the search pattern for "find text" and "change"

uppercase: move to uppercase.

uppercase plain text -- the original string

Result: plain text -- the uppercase string

Satimage files Additions:

Events:

alias description for: provide info needed to refer to a remote item

alias description for alias -- the remote item

Result: a list of plain text -- {the AppleTalk zone name, the server machine name, the server volume name, folder name, […], item name}

list files: the list of the files contained in the folder

list files alias -- a folder

[recursively boolean] -- default: true

[invisibles boolean] -- default: false

Result: a list of alias

navask save: prompt for save

navask save

[file name plain text] -- name of the file

[action small integer] -- 1 = before closing, 2 = before quitting, 0 = none

Result: small integer -- 1 save, 2 cancel, 3 don't save

navchoose file: choose file with navigation services

navchoose file

[with prompt plain text] -- a prompt to be displayed in the file chooser

[of type a list of plain text] -- restrict the files shown to only these file types

[starting at alias] -- the default file or folder

[multiple files boolean] -- allow multiple files selection (default true)

[show packages boolean] -- (default true)

[open packages boolean] -- (default false)

Result: a list of alias -- the chosen files

navchoose file name: Get a new file specification from the user, without creating the file. Uses navigation services

navchoose file name

[with prompt plain text] -- the text to display in the file creation dialog box

[default name plain text] -- the default name for the new file

[with menu a list of plain text] -- list of menu items

[menu index small integer] -- index of the menu item to display

[starting at alias] -- the default folder

[open packages boolean] -- (default false)

Result: file specification -- the file the user specified

navchoose folder: choose folder with navigation services

navchoose folder

[with prompt plain text] -- a prompt to be displayed in the folder chooser

[starting at alias] -- the default folder

[multiple files boolean] -- allow multiple folders selection (default true)

[open packages boolean] -- (default false)

Result: a list of alias -- the chosen folders

navchoose object: choose file or folder with navigation services

navchoose object

[with prompt plain text] -- a prompt to be displayed in the folder chooser

[starting at alias] -- the default folder

[multiple files boolean] -- allow multiple objects selection (default true)

[show packages boolean] -- (default true)

[open packages boolean] -- (default false)

Result: a list of alias -- the chosen objects

navchoose volume: choose volume with navigation services

navchoose volume

[with prompt plain text] -- a prompt to be displayed in the folder chooser

[starting at alias] -- the default folder

Result: a list of alias -- the chosen folders

navnew folder: Get a new folder specification from the user. Uses navigation services

navnew folder

[with prompt plain text] -- the text to display in the file creation dialog box

[starting at alias] -- the default folder

[open packages boolean] -- (default false)

Result: file specification -- the folder the user specified

Satimage utilities Suite: Miscellaneous, yet invaluable, utilities.

Events:

backup: synchronizes 2 folders. backup will resolve the alias located at the first level in the source folder, and no other alias.

backup file specification -- the source folder

onto file specification -- the destination folder

[level small integer] -- 0: report only, 1: synchronize folders, 2 : synchronize and report. Default 0.

[after date] -- files older than this date are not considered.

[recursively boolean] -- recursively synchronize subfolders. Default true.

Result: plain text -- the (optional) report

special concat: concatenate {a_ppty:X, …} and {a_ppty:Y, …} into {a_ppty:Z, …}, where Z is X & Y (resp. X + Y) if X,Y are lists (resp. numbers). Also merges tabulated string arrays side to side (in other terms, adds columns).

special concat record -- the record

with record -- the additional data

Result: record

suppress item: delete an item from a list or a record.

suppress item anything -- the rank or key of the item. Use quotes around custom properties, and also around 4-characters codes. (If you don't know what this means, you don't need it).

from anything -- a list or a record

Result: record

Resource Suite: Utilities to read and write resources from/to a file.

Events:

get resource name: return the name of the resource of the specified type and id from the specified file

get resource name small integer -- index of the desired resource

type type class -- type of the desired resource

from file specification -- file to read from

Result: plain text -- the name of the resource

list resources: return the list of the ids of the resources of the specified type stored in the specified file

list resources type class -- type of desired resources

from file specification -- file to read from

Result: anything -- the list of ids

load resource: get the resource of the given type and id from the specified file

load resource small integer -- index of the desired resource

type type class -- type of the desired resource

from file specification -- file to read from

[as type class] -- an AppleScript type for the returned result

Result: anything -- any AppleScript data that is stored in the resource: data, object specification, reference, etc.

put resource: write the given resource to the specified file with specified type and id

put resource anything -- the AppleScript data that will be stored in the resource

to file specification -- the destination file

type type class -- the resource type

index small integer -- the resource id

[with name plain text] -- the resource name

Mathematical functions: Some mathematical functions. Most functions support as their direct parameter (and return) a list or an array of real. Notice: you may need more parentheses than is intuitive. Ex: cos(a) - b returns cos(a - b), so you may want to write (cos(a)) - b.

Events:

abs: absolute value of direct parameter

abs real

Result: real

acos: arc cosine of direct parameter

acos real -- -1 <= x <= 1

Result: real -- in radians

acosh: hyperbolic arc cosine of direct parameter

acosh real -- a positive number

Result: real

asin: arc sine of direct parameter

asin real -- -1 <= x <= 1

Result: real -- in radians

asinh: hyperbolic arc sine of direct parameter

asinh real

Result: real

atan: arc tangent of direct parameter

atan real

Result: real -- in radians

atan2: the angle of the line whose direction is the vector (x , y)

atan2 a list of real -- 2 real numbers : y (ordinate) and x (abscissa)

Result: real -- in radians

atanh: hyperbolic arc tangent of direct parameter

atanh real -- -1 < x < 1

Result: real

ceil:

ceil real

Result: real

cos: cosine of direct parameter

cos real -- the angle (in radians). If the angle is in degrees, multiply it by pi / 180 before taking the cosine.

Result: real

cosh: hyperbolic cosine of direct parameter

cosh real

Result: real

erf: the error function

erf real

Result: real

erfc: the complementary error function

erfc real

Result: real

exp: exponential of direct parameter

exp real

Result: real

floor:

floor real

Result: real

gamma: the gamma function

gamma real -- a positive number

Result: real

hypot: the square root of the sum of the squares of its arguments

hypot a list of real -- 2 real numbers

Result: real

lgamma: base-e logarithm of the absolute value of gamma

lgamma real -- a positive number

Result: real

ln: base-e logarithm of direct parameter

ln real -- a positive real

Result: real

log10: decimal logarithm of direct parameter

log10 real -- a positive real

Result: real

roots of:

roots of a list of real -- the polynomial, given as the list of its coefficients, 0th degree (constant term) first

Result: a list of real -- roots of the polynomial

sin: sine of direct parameter

sin real -- the angle (in radians)

Result: real

sinh: hyperbolic sine of direct parameter

sinh real

Result: real

sqr: square of direct parameter

sqr real

Result: real

sqrt: square root of direct parameter

sqrt real -- a positive number

Result: real

tan: tangent of direct parameter

tan real -- the angle (in radians)

Result: real

tanh: hyperbolic tangent of direct parameter

tanh real

Result: real

trunc:

trunc real

Result: real

Arrays:

Classes:

Class array of real: a packed list of small real. Can be coerced to an AppleScript list with "as list of real". Conversely, a list of real may be translated using "as array of real" for fast computation.

Class matrix: An AppleScript representation of a 2D array of real numbers as a record:

Properties:

ncols integer -- the number of columns

nrows integer -- the number of rows

array of real array of real -- the data, as an array of real or as a standard AppleScript list of real numbers. Ordering: the first numbers are the data for the first row.

Events:

addlist: same as multlist, but for sums

addlist a list of real

with a list of real

Result: a list of real

changearray: change items in an array of real

changearray array of real -- the array to modify

at integer -- the index of the first item to change (1 based) or a list of indexes (in which case, the "step" and "blocksize" parameters are not taken into account)

into array of real -- the new values

[blocksize integer] -- size of the blocks to copy at each step. The "into" parameter must have a size multiple of blocksize. Default: 1

[step integer] -- the interval between the beginnings of successive blocks to write. Must be larger than blocksize. Default: blocksize

Result: array of real

createarray: create an array of real

createarray integer -- the requested size of the array

[range a list of real] -- {min,max}

Result: array of real

creatematrix: create an array of real of size ncols*nrows

creatematrix plain text -- "1": array of 1.0, "x": array of x values, "y": array of y values

ncols integer -- or a list of real with the "x" option, will make an array with identical rows

nrows integer -- or a list of real with the "y" option, will make an array with identical columns

[range a list of real] -- {min,max}

[as type class] -- array of real or matrix, default: array of real

Result: array of real -- or matrix

divlist: same as multlist, but for quotient

divlist a list of real

with a list of real

Result: a list of real

evalformula: apply C-like mathematical expressions to arrays of real. Ex: evalformula "a*x^2+y^2" with {a:2.4,x:anarray,y:anotherarray}

evalformula plain text -- the formula to compute

[with a list of real] -- the definition of the variables occurring in the formula.

Result: array of real -- or real

extractarray: extract values from an array of real

extractarray array of real

[at integer] -- the first item to read or a list of indexes (in which case, the "for", "step" and "blocksize" parameters are not taken into account). 1-based. Default 1

[for integer] -- the number of blocks to read. Default 1

[blocksize integer] -- size of the block to read at each step. blocksize must be smaller than step

[step integer] -- the interval between the beginnings of successive blocks to read. Must be larger than blocksize. Default: blocksize

[as type class] -- default is array of real, you can provide small real or real for 1 item

Result: array of real

extractitem: (obsolete: use extractarray instead)

extractitem integer

[thru integer]

[step integer]

in array of real

[blocksize integer]

[as type class]

Result: array of real

filter:

filter matrix

using array of real -- a list of 9 real numbers representing the 3x3 convolution matrix

[reduced boolean] -- the resulting matrix is smaller (the 2 extremal columns and rows are removed. Default true.)

Result: matrix

fitpolynomial: given two arrays of real {x,y} returns the best polynomial fit y=P(x)

fitpolynomial a list of array of real -- a list of two arrays of real {x,y}

degree small integer -- the degree of the resulting polynomial

Result: record -- {fit error:the mean error, fit result:the list of the coefficients (constant term first), fit string : the polynomial formula as text}

histogram: given an array of real numbers, return a list of 2 arrays : {sampling values,frequencies}

histogram array of real

samples integer -- number of intervals

[minimum real] -- lower bound of the intervals

[maximum real] -- upper bound of the intervals

Result: a list of array of real -- {sampling values,frequencies}

insertarray: insert items into an array of real

insertarray array of real -- the values to insert

into array of real -- the array to modify

[at integer] -- the index of the first item to insert (0: at the beginning) or a list of indexes of the same size as the direct parameter (in which case, the "for", "step" and "blocksize" parameters are not taken into account). default -1 (insert values at the end)

[for integer] -- number of blocks to insert. default 1

[step integer] -- the number of values between each insertion. default 0

[blocksize integer] -- size of the blocks to insert after each step. The direct parameter must have a size multiple of blocksize. Default: 1

Result: array of real

mask: suppress items (or rows) out of an array of real (or a matrix) with respect to a mask of 0's and 1's

mask array of real -- the array(s) or matrix to be filtered. For a matrix, the rows are deleted.

with array of real -- the filter: an array of real, 0's mean that the corresponding items are to be deleted in the direct object(s).

Result: array of real -- the resulting array(s) or matrix

multlist: performs the product of the parameters. Each parameter may be a list, an array of real, or a number. multlist {x1,x2...} with {y1,y2...} returns {x1.y1, x2.y2, ...}; multlist x with {y1,y2...} returns {x.y1, x.y2, ...}

multlist a list of real

with a list of real

Result: a list of real

randomarray: create a random array of real

randomarray integer -- the requested size of the array

[range a list of real] -- {min,max}

[seed integer]

Result: array of real

read binary: read a file of real or small real

read binary file specification -- the file

as type class -- the format of the data file: real (8 bytes) or small real (4 bytes)

[skip integer] -- the number of leading bytes to skip

[step integer] -- the offset between two consecutive readings

[length integer] -- the number of real to read

Result: array of real

replacemissingvalue: replace missing values (or NAN's) in a list, or an array of real, or a list of such.

replacemissingvalue array of real -- or a list of arrays

with small real

Result: array of real -- or a list of arrays

reversearray: returns reverse of the direct parameter.

reversearray a list of real -- ... or an array of real

Result: array of real

runningsum: returns the running sum of an array of real

runningsum array of real

Result: array of real

sortarray: sort an array (or synchronously a list of arrays)

sortarray array of real -- the array of real to sort (or a list of arrays of real)

[with respect to integer] -- in case of a list of array of real, specifies which one to use as the sort criterion. Default 1.

[ascending boolean] -- default true

Result: array of real -- the sorted array (or arrays)

statlist: returns as a record the min, max, min index, max index, mean, sum, standard deviation, variance.

statlist a list of real -- ... or an array of real

Result: record

sublist: same as multlist, but for subtraction

sublist a list of real

with a list of real

Result: a list of real

transpose: transpose a matrix

transpose matrix -- the matrix

Result: matrix -- the transposed matrix

write binary: write the data into a binary file of small real (4 bytes per number)

write binary file specification -- the file

with data array of real

[starting at integer] -- offset in bytes, default: append data at the end of the file

[as type class] -- the format of the data to be saved: real (8 bytes) or small real (4 bytes). Default: real.

 

|| url: http://www.foodoo.sunreal.com.au/info/dictionaries/Satimage_262_asDict.html
|| created: 23-Aug-04, 4:34 PM; updated: 23-Aug-04, 4:38 PM
|| size: 92785 bytes