The FooDoo Lounge

Smile 2.6.5 Dictionary

Copyright 2004 Satimage-software.

Index

  1. Standard Suite
  2. Smile
  3. Smile text suite
  4. Smile scripted scripting
  5. Smile events
  6. Smile drawings Suite
  7. Smile IO devices

Standard Suite: Common commands for most applications.

Events:

close: Close an object.

close reference -- the object to close.

[saving 'savo'] -- Specifies whether changes should be saved before closing.

count: Return the number of elements of a particular class within an object.

count reference -- the object whose elements are to be counted

[each type class] -- The class of objects to be counted.

Result: integer -- the number of elements

delete: Delete an object.

delete reference -- the object to delete.

get: Get the data for an object.

get reference

Result: anything

make: Make a new object.

make

new type class -- The class of the new object.

[at location reference] -- The location at which to insert the object.

[with properties record] -- The initial values for properties of the object.

Result: reference -- to the new object

open: Open an object.

open alias -- The file(s) to be opened.

quit: Quit an application.

quit

save: Save an object.

save reference -- the object to save, usually a window.

[in file specification] -- The file in which to save the object.

[as plain text] -- The file type in which to save the data.

set: Set an object's data.

set reference

to anything -- The new value.

Result: anything

Smile:

Classes:

Class Unicode window:

Plural form:

Unicode windows

Properties:

<Inheritance> window

Class application: the application program

Elements:

window by numeric index, by name, by ID

text window by numeric index, by name, by ID

script window by numeric index, by name, by ID

Unicode window by numeric index, by name, by ID

graphic window by numeric index, by name, by ID

dialog by numeric index, by name, by ID

IO device by numeric index, by name, by ID

menu by numeric index, by name

menu command by numeric index

movie window by numeric index, by name, by ID

Properties:

<Inheritance> basic object

creator type type class [r/o]

version integer [r/o]

cursor arrow/watch/busy

screen bounds bounding rectangle [r/o]

user folder file specification [r/o] -- the folder related to the Scripts menu

user script file file specification [r/o] -- the currently running script file

context script [r/o] -- the class script of the basic object class

globals script [r/o] -- the script of the permanent global variables

dictionary plain text [r/o] -- the dictionary of the application

modifiers a list of option down/command down/control down/shift down/caps lock down [r/o]

clipboard anything -- can contain text, references etc.

recording boolean -- toggled to record scripts

console reference -- the text window for recording

chrono small real -- the time elapsed (in seconds) since the last "chrono" call

mouse location point

mouse button boolean

background boolean

serial ports a list of plain text [r/o] -- A list of info for each serial device. This info is a list {kind, UNIX path, name}. kind=9 means RS232.

Class basic object: generic class which has the properties owned by each object

Plural form:

basic objects

Properties:

class type class [r/o]

name plain text

id integer [r/o] -- the unique id number

container reference [r/o] -- the object it belongs to

named reference reference [r/o] -- a reference by name

bounds bounding rectangle

path name file specification

visible boolean

drawing boolean -- does the object draw its result ?

class script script -- the script shared by all objects of the same class

script script -- the personal script of the object

extras anything -- any user data

extension file plain text -- the name of the file containing the external code for the object

current dialog integer -- the id number of the information window for the object

want idle boolean -- does its script receive an 'idle' callback on idle events ?

idle delay small real -- delay between idle events in seconds

properties record -- the properties of the object

whole record [r/o] -- the properties and elements of the object

Class dialog:

Plural form:

dialogs

Elements:

dialog item by numeric index, by name

Properties:

<Inheritance> window

contained data record -- the contents of the dialog items, by keyword

modal boolean -- does the dialog have to be closed before any new user action ?

focus reference -- the active item

mode boolean -- is the dialog in edit mode?

owner reference -- (advanced)

Class dialog item:

Plural form:

dialog items

Properties:

<Inheritance> basic object

enabled boolean

contained data anything -- contents of the item

control kind small integer -- the control type as in control manager

call script boolean -- does it trigger a "click in" call to the script of the dialog?

Class dialog list item: an item of a dialog which displays a list

Properties:

<Inheritance> dialog item

selection a list of small integer -- the indexes of the selected items

Class menu:

Plural form:

menus

Elements:

menu item by numeric index, by name

Properties:

name plain text

enabled boolean

Class menu command: same as menu item, but access is by command id

Class menu item:

Plural form:

menu items

Properties:

name plain text

enabled boolean

checked boolean

modifiers a list of option down/command down/control down/shift down/caps lock down

shortcut plain text

Class movie window:

Properties:

<Inheritance> window

frame rate small real -- 1.0: normal rate

image matrix [r/o] -- the current frame as a matrix, only available with gray levels

Class script window:

Plural form:

script windows

Properties:

<Inheritance> text window

Class text:

Properties:

text size small integer

text font plain text -- the font name or index

text color RGB color -- a list, e.g. {0,0,0} for black

style 'tsty'

length integer

index integer -- the index of the first character of the text in its window

boundaries a list of integer -- the text range as a list of 2 integers

paragraph index integer

word index integer

Class text window:

Plural form:

text windows

Elements:

character by numeric index, before/after another element, as a range of elements, satisfying a test

'cwor' by numeric index, before/after another element, as a range of elements, satisfying a test

'cpar' by numeric index, before/after another element, as a range of elements, satisfying a test

text by numeric index, before/after another element, as a range of elements, satisfying a test

run info by numeric index, before/after another element, as a range of elements, satisfying a test

Properties:

<Inheritance> window

selection a list of integer -- the selection range, or the selected text (as text)

line width small integer

fit to window boolean -- adjust text to window width

tab width small integer

scripting language plain text -- the default scripting language

console reference -- the text window for output (default : the same window)

store undo boolean -- true-false to encapsulate complex operations avoiding ridiculous undo's

update screen boolean -- false-true to encapsulate complex operations avoiding lengthy text calculations

Class window: generic window

Elements:

'Beha' by numeric index, by name, by ID

Properties:

<Inheritance> basic object

visible boolean -- (making a window invisible also sends it behind every other window)

corner a list of integer -- {left, top}: the upper left corner of the window in screen coordinates

text font plain text -- the name of the font or its id number

text size small integer

width small integer -- the width

height small integer -- the height

resource id small integer -- the id number of the resource containing the definition of the window

message height small integer -- the height of the button bar in a text window or of the message bar in a video window

collapsed boolean

closeable boolean -- Does the window have a close box?

resizable boolean -- Is the window resizable?

zoomable boolean -- Is the window zoomable?

modified boolean -- Is the window modified

never save boolean -- when the user closes the window, don't ask for saving the changes

message bar 'Tool' -- the text field in a video window

Events:

add library: augment the Smile's context with the contents of a text or compiled script file.

add library alias -- a text file or a (not run-only) script file

display: return the direct object as a string

display anything

Result: plain text

do script: execute a script

do script plain text -- the script

[as type class] -- wanted type for the result

Result: anything

draw: draw an object

draw reference

postit: display a string in a small floating window (use "" to dismiss the window)

postit plain text

reveal: Bring the specified object(s) into view

reveal reference

smilepause: wait until the right arrow key is pressed or the delay is elapsed. Press escape or cmd-period to trigger a "User canceled" error.

smilepause real -- the timeout in seconds

Smile text suite:

Events:

Cformat: format a real number using a specification string like in the C function printf. Ex: Cformat pi into ".4g"->"3.142".

Cformat real -- the number

into plain text -- the formatting string, [flags][width][.precision]type. Type must be into e, E, f, g, G. flags: -, +, blank, #.

latex boolean -- output the scientific notation as a latex string more suitable for drawings.

Result: plain text -- the formatted number

converttext:

converttext plain text -- the string to convert

from plain text -- the initial encoding

to plain text -- the requested encoding

Result: plain text -- the converted string

decode64: decode the base64 encoded direct parameter.

decode64 plain text -- the encoded string

[as type class] -- Default: Unicode text

[typed boolean] -- Default: true. If true, the "as" parameter is optional, "decode64" returns a quantity of the original AppleScript type. If false you have to specify the "as" parameter to get a returned value of a given type.

Result: anything

encode64: encode the direct parameter using the base64 encoding and return the string.

encode64 anything

[typed boolean] -- Default: true. True: include the AppleScript type within the encoded entity. False: encode as raw data. If false, you have to specify a "as" parameter when reading the data with "decode64".

Result: plain text -- the encoded string

escapeURL:

escapeURL Unicode text

Result: Unicode text

extractcolumn: extract columns out of an array. The array may be supplied as a tabulated text, or as a matrix.

extractcolumn small integer -- the column index (or a list of column indexes)

[thru small integer] -- the last column

in anything -- a file, a string or a matrix

[as type class] -- requested type for the result: string, array of real or matrix. default is array of real when the in parameter is a matrix, or string otherwise

[skipping small integer] -- number of lines to skip

Result: plain text -- the columns

localize: (advanced) returns the localized string as found in the "Smilelocalized.strings" file of the current ".lproj" folder

localize plain text

[encoding small integer]

Result: plain text

textencodings:

textencodings

[as type class] -- string or integer, default : string

Result: a list of plain text -- the available text encodings

uchange: the Unicode version of change

uchange Unicode text -- the substring to search for

into Unicode 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] -- 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}

ufind text: the Unicode version of find text

ufind text Unicode text -- the substring to search for

in Unicode 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] -- 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)}

unescapeURL:

unescapeURL Unicode text

Result: Unicode text

Smile scripted scripting:

Events:

check syntax: check syntax of a script window

check syntax reference -- the script window

execute: run the script contained in a script window

execute reference -- the script window

[as type class] -- default : return the raw result

Result: plain text -- result of the script

find definition for:

find definition for plain text

[in alias] -- (list of) file or folder, default : scripting additions folder

[as type class] -- default : return the definition as styled text

Result: anything

Smile events:

Events:

click in: event generated by a click in an object

click in reference -- the object

item number small integer

do menu: event sent by the application when a menu item is selected

do menu plain text -- the code (4 characters) or name of the command

to reference -- the target of the command

drop: event generated by dropping

drop anything -- the dropped object

onto reference -- the destination object

[at point] -- the drop coordinates

export: return a description for the object to export

export reference -- the object

Result: anything

keydown: event sent to the script of the (front) graphic window when the user hits a key

keydown reference -- the graphic window

event record -- {character:the character,modifiers:the modifiers}

notify: a general mechanism intended for sending messages from an object to another.

notify reference -- the recipient object

[from reference] -- the sender

with data anything -- the message

[with delay small real] -- seconds

pick in: event sent to the script of the graphic view (or the graphic window, or the widget) when the user clicks in it.

pick in reference -- a graphic view, a graphic window or a widget

at record -- {point:{x, y} or {x, y, z} for the view3D, step:1 (mouse down), 2 (mouse dragged), 3 (mouse up), target object (view3D only): the object under the mouse e.g. a surface}

prepare: event sent by the application when an object is created

prepare reference -- the newly created object

resized: event send to the script of the graphic window or of the views when the user resizes the object

resized reference -- a graphic window or a view

store: sent by the application just before saving an object

store reference -- the object being saved

Smile drawings Suite:

Classes:

Class graphic view: a virtual class, the common ancestor for a set of classes of objects that you may create in a graphic window.

Properties:

<Inheritance> basic object

frame a list of small real -- {x origin,y origin,width,height}. Defines the rectangular region which will be erased when the graphic object is redrawn. The rectangle is relative to the origin of the graphic window. Values are real numbers. Unit = 1/72 inch (1 pixel)

back pdf plain text -- The PDF data for the background of the view. Can be set to a file, to some Graphic Kernel output or to raw PDF data as string.

front pdf plain text -- The PDF data drawn after the background and the contents of the view. Can be set to a file, to some Graphic Kernel output or to raw PDF data as string.

Class graphic window: a window where you can draw pictures of various kinds by script, and that you can save as a PDF file or as a jpg, png or tiff file.

Plural form:

graphic windows

Elements:

graphic view by numeric index, by name, by ID

widget by numeric index, by name, by ID

Properties:

<Inheritance> window

frame a list of small real -- {x origin,y origin,width,height}, the page frame. Values are real numbers. Unit = 1/72 inch (1 pixel). Prefer pageheight and pagewidth

pageheight small real -- Unit = 1/72 inch. Can be set in inches or centimeters

pagewidth small real -- Unit = 1/72 inch. Can be set in inches or centimeters

grid a list of small integer -- a list of 2 integers, default is {1,1}. These numbers are used to provide default frames to the graphic views. The first (resp. second) number is the number of expected views horizontally (resp. vertically)

back pdf plain text -- The PDF data for the background of the window. Can be set to a file, to some Graphic Kernel output or to raw PDF data as string.

front pdf plain text -- The PDF data drawn after the background and the graphic views of the window. Can be set to a file, to some Graphic Kernel output or to raw PDF data as string.

title offset small real -- vertical offset for view's titles

template plain text -- name of a file in the 'SmileLab templates' folder, that will specify the default settings

movie file file specification -- file path for recording

Class print settings:

Properties:

copies integer

collating boolean

starting page integer

ending page integer

pages across integer

requested print time date

printer features list

fax number plain text

target printer plain text

Class widget: a scriptable point marker for graphic windows and planar views.

Properties:

<Inheritance> basic object

point a list of small real -- {x,y}

pattern style small integer -- 0 none, 1 circle, 2 square, 3 diamond, 4 upwards triangle, 5 downwards triangle, 6 x-cross, 7 cross, 8 dot, 9 custom

custom pattern a list of small real -- {x1,y1,..,xn,yn}, coordinates of the polygon which will be used as the pattern (effective only is "pattern style" is set to 9)

pattern size small real -- size of the pattern if "pattern style" is not 0

pen color a list of small real -- {red=0..1,green,blue,alpha=0..1}, alpha = 1 = opaque drawing

fill color a list of small real -- {red=0..1,green,blue,alpha=0..1}, alpha = 1 = opaque drawing

pen width small real

Events:

addPDF: append more PDF data into an object

addPDF plain text -- the PDF data or file

in reference -- the back pdf (or front pdf) property of a graphic window or a graphic view

at anything -- a point or a rect

convert coordinates: turn user coordinates (as defined in a chart view) into pixels

convert coordinates a list of small real -- the point in user coordinates (as shown by the axes)

in 'VivP' -- the chart view in which the translation is made

Result: a list of small real -- the point in pixels, relative to the chart view's system of coordinates

convert imagefile: return the array of the gray levels of a bitmap image (JPEG, TIFF etc.)

convert imagefile alias

[subrect bounding rectangle]

Result: matrix

imagefile bounds: return the bounds of a bitmap image (JPEG, TIFF etc.)

imagefile bounds alias

Result: bounding rectangle

makePDF: used internally by the Graphic Kernel library to generate PDF data

makePDF plain text -- the PDF source string as built internally by Graphic Kernel

[in anything] -- write directly into this file

media box bounding rectangle

Result: plain text -- the PDF data

measuretext: return the sizes of a string as Graphic Kernel will draw it

measuretext plain text -- the text to measure: must be a single line (not containing a CR)

[font record] -- specify text size and font, ex: {text font:"Arial", text size:40}

[latex boolean] -- if true, translate _, ^, \alpha ... as in Latex. Default: true

Result: a list of small real -- the box enclosing the text : {x,y,width,height}, relative to the current text position

print: print a graphic window

print graphic window

[with properties print settings]

[print dialog boolean]

[offset a list of real] -- {dx, dy} an optional offset to shift drawings in the page

[in file specification] -- redirect to this PDF file

Smile IO devices:

Classes:

Class Delcom USB Board: (www.delcom-eng.com) the IO device for driving the Digital I/O USB Delcom board. Includes two ports of 8 bits each.

Elements:

digital port by numeric index

Properties:

<Inheritance> IO device

slot small integer -- index of the USB Delcom board, used to identify the device if several are present, default 1

Class Delcom USB Display: (www.delcom-eng.com) the IO device for numeric display on seven segments LED digits

Properties:

<Inheritance> IO device

slot small integer -- index of the USB Delcom display, used to identify the device if several are present, default 1

active boolean -- true by default. Write only

contained data a list of small integer -- either a string or a list of 1 up to 6 integers in the 0-255 range (in this case the integers code for the segments of a digit: each bit corresponds to one digit). Write only

flash rate small integer -- unit: 10ms. Write only

buzzer record -- {active: true/false, «class Freq»:frequency value (unit: 256 Ás), «class Buz0»: cycles repeat value (except 0: no off time, 255: infinite repeat), «class Buz1»: duty cycle's on time, «class Buz2»: duty cycle's off time}. Write only

Class IO device: I/O peripheral

Properties:

<Inheritance> basic object

Class RS232: RS232 device

Properties:

<Inheritance> IO device

configname plain text -- UNIX path to the serial port (as provided in the serial ports Smile's property)

RSOptions RSOptions

enabled boolean

contained data plain text -- data to send or data received

Class RSOptions: Options for RS232. Use 'man termios' for documentation.

Properties:

bauds small integer

databits small integer -- data bits count (5, 6, 7 or 8)

stopbits small integer -- 1: send one stop bit, 2: send two stop bits

parity small integer -- 0: disabled, 1: enabled, 2: odd parity

flowcontrol small integer -- a value between 0 and 31. bit 1: CCTS_OFLOW, bit 2: CRTS_IFLOW, bit 3: CDTR_IFLOW, bit 4: CDSR_OFLOW, bit 5 : CCAR_OFLOW.

ICANON small integer -- 0 or 1: canonicalize input lines

Class bit: I/O bit

Properties:

contained data small integer -- 0 or 1

Class digital port: I/O digital port

Elements:

bit by numeric index

Properties:

contained data small integer -- a value between 0 and 255

 

|| url: http://www.foodoo.sunreal.com.au/info/dictionaries/Smile_265_asDict.html
|| created: 23-Aug-04, 4:19 PM; updated: 23-Aug-04, 4:28 PM
|| size: 103883 bytes