The FooDoo Lounge

Satimage 2.4.6 Dictionary

Copyright 2002, Satimage. All rights reserved.

Index

  1. Satimage text Additions
  2. Satimage files Additions
  3. Satimage utilities Suite
  4. Resource Suite
  5. Math

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

Events:

change: replace all occurences 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 a file path

[case sensitive boolean] -- default true

[regexp boolean] -- default false

[whole word boolean] -- 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", but safer.

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 to search for (or a result of re_compile for advanced use of regexp)

in plain text

[case sensitive boolean] -- default true

[regexp boolean] -- default false

[whole word boolean] -- default false

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

[using plain text] -- the pattern to generate the string (regexp)

Result: record -- {matchLen:length of the match,matchPos: offset of the match,matchResult:the result when "regexp" is true and "using"}

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,.,%,',(,),+,-

Result: plain text -- the formated 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","ICASE","NOSUB"}; default {"EXTENDED","NEWLINE"}

Result: re_pattern -- an opaque pattern which may be used as the search string 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 on close, 2 on quit, 0 ?

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 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

[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

[show packages boolean] -- (default true)

[open packages boolean] -- (default false)

Result: a list of alias -- the chosen folders

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 file: Get a new file specification from the user, without creating the file. Uses navigation services

navnew file

[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

[starting at alias] -- the default folder

[open packages boolean] -- (default false)

Result: file specification -- the file the user specified

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 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 processed.

[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).

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: anything -- 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

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

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.

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

addlist: same as multlist, but for sums

addlist a list of real

with a list of real

Result: a list of 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

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

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

nrows integer

Result: array of real

divlist: same as multlist, but for quotient

divlist a list of real

with a list of real

Result: a list of 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

extractitem:

extractitem integer -- the first item to read

[thru integer] -- default -1

[step integer] -- default 1

in array of real

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

Result: array of 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

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

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 bytes to skip

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

Result: array of real

replacemissingvalue: replace missing values (or nans) in a list (or an array of real)

replacemissingvalue a list of small real

with small real

Result: a list of small real

reversearray: returns reverse of the direct parameter.

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

Result: array of real

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

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

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

Result: record

sublist: same as multlist, but for substraction

sublist a list of real

with a list of real

Result: a list of real

tan: tangent of direct parameter

tan real -- the angle (in radians)

Result: real

tanh: hyperbolic tangent of direct parameter

tanh real

Result: real

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

 

|| url: http://www.foodoo.sunreal.com.au/info/dictionaries/Satimage_246_asDict.html
|| created: 4-Aug-03, 9:48 PM; updated: 4-Aug-03, 2:48 PM
|| size: 65100 bytes