Re: [NTLK] Newton Press question...

From: Grant Hutchinson (grant_at_splorp.com)
Date: Fri Dec 13 2002 - 01:05:38 EST


In a previous message, Laurent Daudelin typed vigorously:

>> Is Newton Press scriptable? (i.e. works with
>> Applescript?)
>
>Does it appear in the application list when you choose "Open Dictionary" i=
n
>the script editor? If not, then I don't think it's scriptable (I doubt it =
is
>anyway)...

Indeed it is:

Standard Suite: Common terms for most applications

open: Open the specified object(s)
        open reference -- list of objects to open

run: Run an application. Most applications will open an empty, untitled
window.
        run

reopen: Reactivate a running application. Some applications will open a
new untitled window if no window is open.
        reopen

print: Print the specified object(s)
        print reference -- list of objects to print

quit: Quit an application
        quit
                [saving yes/no/ask] -- specifies whether to save currently open
documents

close: Close an object
        close reference -- the object to close
                [saving yes/no/ask] -- specifies whether changes should be saved
before closing
                [saving in alias] -- the file in which to save the object

count: Return the number of elements of an object
        count reference -- the object whose elements are to be counted
                [each type class] -- if specified, restricts counting to objects of
this class
        Result: integer -- the number of elements

delete: Delete an object from its container. Note this does not work on
script variables, only on elements of application classes.
        delete reference -- the element to delete

duplicate: Duplicate one or more objects
        duplicate reference -- the object(s) to duplicate
                [to location reference] -- the new location for the object(s)
                [with properties record] -- the initial values for properties of the
new object that are to be different from the original
        Result: reference -- to the duplicated object(s)

exists: Verify if an object exists
        exists reference -- the object in question
        Result: boolean -- true if it exists, false if not

make: Make a new element
        make
                new type class -- the class of the new element
                [at location reference] -- the location at which to insert the element
                [with data anything] -- the initial data for the element
                [with properties record] -- the initial values for the properties of
the element
        Result: reference -- to the new object(s)

move: Move object(s) to a new location
        move reference -- the object(s) to move
                to location reference -- the new location for the object(s)
        Result: reference -- to the object(s) after they have been moved

save: Save an object
        save reference -- the object to save, usually a document or window
                [in alias] -- the file in which to save the object
                [as type class] -- the file type of the document in which to save the
data

select: Make a selection
        select reference -- the object to select

data size: (optional) Return the size in bytes of an object
        data size reference -- the object whose data size is to be returned
                [as type class] -- the data type for which the size is calculated
        Result: integer -- the size of the object in bytes

suite info: (optional) Get information about event suite(s)
        suite info type class -- the suite for which to return information
                [in 'intl'] -- the human language and script system in which to
return information
        Result: a list of type suite info -- a record containing the suites
and their versions

event info: (optional) Get information about the Apple events in a suite
        event info type class -- the event class of the Apple events for which
to return information
                [in 'intl'] -- the human language and script system in which to
return information
        Result: a list of type event info -- a record containing the events
and their parameters

class info: (optional) Get information about an object class
        class info type class -- the object class about which information is
requested
                [in 'intl'] -- the human language and script system in which to
return information
        Result: type class info -- a record containing the object=B9s
properties and elements

Class application: An application program
Plural form:
        applications
Properties:
        name international text [r/o] -- the name of the application
        frontmost boolean [r/o] -- Is this the frontmost application?
        selection selection-object -- the selection visible to the user. Use
the =8Cselect=B9 command to set a new selection; use =8Ccontents of selecti=
on=B9
to get or change information in the document.
        clipboard a list of anything -- the contents of the clipboard for this
application
        version version [r/o] -- the version of the application

Class document: A document of a scriptable application
Plural form:
        documents
Properties:
        modified boolean [r/o] -- Has the document been modified since the
last save?

Class file: a file on a disk or server (or a file yet to be created)
Plural form:
        files
Properties:
        stationery boolean -- Is the file a stationery file?

Class alias: a file on a disk or server. The file must exist when you
check the syntax of your script.
Plural form:
        aliases

Class selection-object: A way to refer to the state of the current of the
selection. Use the =8Cselect=B9 command to make a new selection.
Properties:
        contents anything -- the information currently selected. Use
=8Ccontents of selection=B9 to get or change information in a document.

Class window: A window
Plural form:
        windows
Properties:
        bounds bounding rectangle -- the boundary rectangle for the window
        closeable boolean [r/o] -- Does the window have a close box?
        titled boolean [r/o] -- Does the window have a title bar?
        index integer -- the number of the window
        floating boolean [r/o] -- Does the window float?
        modal boolean [r/o] -- Is the window modal?
        resizable boolean [r/o] -- Is the window resizable?
        zoomable boolean [r/o] -- Is the window zoomable?
        zoomed boolean -- Is the window zoomed?
        visible boolean -- Is the window visible?

Class insertion point: An insertion location between two objects
Plural form:
        insertion points

Newton Press: Definitions specific to Newton Press

build: Create Book Package
        build alias -- document
                package alias -- Package file (will be overwritten if it exists)

show toc: Show Table of Contents
        show toc

......................................................................

Grant Hutchinson Interface Considerations & Toys

Live video served fresh since 1996. http://www.splorp.com/cam/
Now fortified with daily ramblings. http://www.splorp.com/blog/
Newton. It's the Palm with a brain. http://www.splorp.com/newton/
Online community web site handyman. http://www.newted.net/

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
List FAQ/Etiquette/Terms: http://www.newtontalk.net/faq.html
Official Newton FAQ: http://www.chuma.org/newton/faq/



This archive was generated by hypermail 2.1.2 : Wed Jan 01 2003 - 10:02:22 EST