Portfolio v6.1 (OSX) AppleScript Library Listing


<< Extracting Metadata from ...
Back to Portfolio FAQ index
Portfolio v6.0x (OS9) App ... >>

An excerpt of the Portfolio 6.1 AppleScript Library. (Library export via Script Debugger)

Required Suite : Terms that every application should support


Core Suite : Common terms for most applications

open: The file to be opened
   open reference -- The file to open
      [using mode browser/reader/editor/publisher/administrator] -- The user mode to use when opening the database.
      [with username string] -- Username to open the file with.
      [with password string] -- Password to open the file with.

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 objects to close
      [saving yes/no/ask] -- specifies whether changes should be saved before closing
      [saving in file] -- the file or alias 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
   delete reference -- the element to delete
      [from constant] -- Removes record from gallery or catalog - default is gallery.

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 -- Save the object
      [in file] -- the file or alias in which to save the object
      [as type class] -- the file type of the document in which to save the data
      using name string -- The name of the gallery to save

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

data size: 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 <<class 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 <<class 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 <<class intl>>] -- the human language and script system in which to return information
   Result: type class info -- a record containing the object's properties and elements

get: Get the data for an object
   get reference -- the object whose data is to be returned
   Result: anything -- The data from the object

set: Set an object's data
   set reference -- the object to change
      to anything -- the new value

Class application: An application program
Plural form:
   applications
Elements:
   window by numeric index, by name, before/after another element
   gallery by name
Properties:
   name international text [r/o] -- the name of the application
   frontmost boolean [r/o] -- Is this the frontmost application?
   selection selection -- the selection visible to the user. Use the 'select' command to set a new selection; use 'contents of selection' 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
   display welcome small integer
   properties record

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:
   POSIX path string [r/o] -- the POSIX path of the 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
Properties:
   POSIX path string [r/o] -- the POSIX path of the file

Class selection: The selection visible to the user
Elements:
   record by numeric index, satisfying a test
Properties:
   contents anything -- the information currently selected. Use 'contents of selection' 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?
   name international text -- the title of the window
   visible boolean [r/o] -- is the window visible?
   position point [r/o] -- upper left coordinates of window
   database <<class cDB>> [r/o]

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


odds and ends: Things that should be in some standard suite, but aren't

select: Select the specified object
   select reference -- the object to select


Portfolio Suite : Events unique to Portfolio

catalog: Tell Portfolio to catalog a file
   catalog alias -- The file object to be cataloged
      [to gallery] -- The gallery to which the files should be added. If omitted, the active gallery is targeted.
      [show options boolean] -- show cataloging options dialog for files
   Result: boolean -- The result of the cataloging operation. 'True' if the cataloging operation started successfully.

close catalog: Closes a catalog.
   close catalog alias -- The catalog to be closed.

create web pages: create web page(s) of the current selection of the frontmost gallery
   create web pages alias -- Name of the first page of HTML to be exported.
      [using template string] -- Name of the HTML template to use for generating the HTML. If omitted, the current settings of the active gallery are used.

display: Scroll the gallery to display a particular item in the gallery.
   display record

export text: Exports records from a Portfolio Database to a Text File.
   export text alias -- The file to export the text to. The file will be overwritten if one already exists.
      [using a list of list] -- The list of fields to be exported.

find: Conduct a search of a Portfolio catalog.
   find record -- records to search, e.g. find records of the front gallery matching "description" & tab & "exists" in all records
      matching string -- The query as text used for searching. A query line is "field" & tab & "operator" & tab & "string" and a query is one or more query lines separated by returns.
      [in all records/shown records] -- Search in "all records" or "shown records"

search: Conduct a search of a Portfolio catalog
   search gallery -- gallery to search - defaults to frontmost gallery.
      [for string] -- search criteria as text - defaults to find all. this may be a string to search for or an advanced query, e.g. "description" & tab & "exists" & return & "name" & tab & "ends with" & tab & ".jpg"
      [in all records/shown records] -- Search in "all records" or "shown records" - defaults to all records
   [Result: integer] -- number of records found

gallery copy: Copies records from one gallery of a catalog to another.
   gallery copy selection -- The record set to copy.
      to gallery -- The gallery to which to copy the records.

import: Import data from a text file into a Portfolio catalog
   import alias -- File to import from
      using string -- The saved import set to use

is cataloging: A flag indicating whether Portfolio is currently cataloging files
   is cataloging
   Result: boolean -- 'True' indicates Portfolio is currently cataloging items.

new catalog: Creates a new portfolio catalog
   new catalog file specification -- The place where the new catalog will be created

new gallery:
   new gallery <<class NULL>>

new record: Creates a new record in the front most gallery
   new record
      using name string
   Result: unsigned integer -- The record id of the newly created record.

open gallery: Open up a gallery with the supplied name.
   open gallery string -- The name of the gallery to open.

open server: Open a Portfolio catalog residing on a Portfolio Server
   open server string -- Opens a catalog on a Portfolio server. The string must be in the form of "portfolio://IP address/Database Name" for native served catalogs, and "portfoliosql://IP address/Database Name" for SQL served catalogs.
      [using mode <<class OPMD>>] -- The user mode to use when opening the catalog.
      [with username string] -- Username to open the file with.
      [with password string] -- Password with which to open the catalog.

remove selection: Removes selection from the front-most gallery
   remove selection
      [from catalog boolean] -- Removes record from catalog as well as gallery
   Result: boolean

serve catalog: Serve a catalog
   serve catalog
      [autoserve integer]
      ip address string -- The ip address of the catalog to serve.
      using name <<class text>> -- The partial path of the catalog to serve.

serve sqlcatalog: Serve a SQL catalog
   serve sqlcatalog
      sql server name string
      [autoserve integer]
      ip address string -- The ip address of the catalog to serve.
      using name <<class text>> -- The partial path of the catalog to server
      [with password string] -- Password with which to open the catalog.
      user name string

sort: Sort records in a gallery
   sort gallery -- The gallery to sort
      by column -- The field to sort on
      [in order ascending/descending]

unselect all: Unselect all records
   unselect all record

unserve catalog:
   unserve catalog
      using name <<class text>> -- The partial path of the catalog to unserve
      timeout integer -- The number of seconds to wait before forcing the users off.
      ip address string -- The ip address of the catalog to unserve.

Class cataloging options: Cataloging Options
Elements:
   custom field <<keyform prop>>, by numeric index, by name
Properties:
   assign properties boolean -- assign keywords, description and custom fields to cataloged items.
   keywords a list of string -- The keywords added to all new items.
   description string -- The descriptive text added to all new items.
   thumbnail quality high/medium/low -- The quality of the thumbnails that are generated.
   thumbnail size size112/size256 -- The size of the thumbnails that are generated.
   thumbnail extraction off/only/optional/required -- The source and requirements of the thumbnail.
   video thumbnail by poster frame/frame number/time -- The method of generating thumbnails for movies.
   video thumbnail value integer -- if video thumbnail is by frame then this is the frame number to use. if video thumbnail is by time then this is the number of seconds to skip.
   keyword extraction off/merge/replace -- The method by which keywords are extracted from files and applied to items.
   description extraction off/append/replace -- The method by which the description is extracted from files and applied to items.
   path keywords off/file name/file and folder name/path/path and volume -- Method for creating keywords based on the location of files.
   path categories off/folder/path -- Method for creating categories based on the location of files.
   digimarc detection boolean [r/o] -- Check for digimarc IDs in image files.
   index document text boolean -- Extract text from supported documents for use with Find Document Text feature.
   exclude document text a list of string -- list of terms to exclude from indexed document text.

Class gallery: A Gallery
Elements:
   cataloging options <<keyform prop>>
   record by numeric index
Properties:
   selection selection [r/o] -- The selected items
   name international text [r/o] -- The title of the gallery
   modified boolean [r/o]
   view integer

Class field: The fields of a record
Plural form:
   fields
Properties:
   name string [r/o] -- name of field
   value string -- value of field as string
   custom boolean [r/o] -- True if the field is custom field and false if not.

Class record: An item in the database
Plural form:
   records
Elements:
   field by numeric index, by name
Properties:
   name text [r/o] -- Name of the record (same as file name)
   id integer [r/o] -- Unique id of a record
   path text -- Full path to the source file
   volume text -- Name of the volume the source file resides on
   filename text -- Name of the source file
   extension win text -- The Windows extension (file suffix)
   created date -- The date the source file was created
   last modified date -- The date the source file was last modified
   file size integer -- The size of the file, in kb.
   last updated date -- The date the item was last updated in Portfolio
   cataloged date -- The date the record was created in Portfolio
   description text -- The record's description
   keywords list -- A list of the keywords for the record
   thumbnail picture -- The file's thumbnail (returned as a PICT)
   file type mac text -- The four-character Macintosh file type of the source file
   creator mac text -- The four-character creator code of the source file
   short file name win text -- The 16-bit (DOS) file name of the source file
   zone mac text -- The name of the Appletalk zone in which the source file is located.
   thumbnail Size integer -- The size of the thumbnail stored in the record (either 0, 32, 64, 112, or 256)
   color mode integer -- The color mode of the source file, stored as an integer
   horizontal resolution real -- The horizontal resolution (in DPI) of the source file
   vertical resolution real -- The vertical resolution of the source file
   width integer -- The width (in pixels) of the source file
   height integer -- The height (in pixels) of the source file
   category list -- The list of category ID's assigned to a record.
   number of pages integer -- The number of pages the cataloged item contains
   place holder integer -- 1 if the record is a place holder record and zero if not.
   watermarked integer -- 0 - Digimarc ID Unknown, 1 - Digimarc ID not detected, 2 - Digimarc ID detected.
   watermark url list -- The watermark url.
   directory path text [r/o] -- Full path to the parent directory of the source file.

Class custom field: The custom fields of a record
Plural form:
   custom fields
Properties:
   id integer [r/o] -- id of field
   name string [r/o] -- name of field
   value string -- value of field as string



Question: Portfolio v6.1 (OSX) AppleScript Library Listing [FAQ00328.htm]
Last Update:- 01 June 2006


<< Extracting Metadata from ...
Back to Portfolio FAQ index
Portfolio v6.0x (OS9) App ... >>

Quick Search of PortfolioFAQ (word, words or phase): or try the Advanced Search

User-to-User Forums  |  Report error/typo/broken link  |  Request new topic  |  Ask a question

Site and articles © Mark Anderson 2001-2007 - Visit my home page


This FAQ is created and maintained using
Friday logo
Friday - The Automatic FAQ Maker