Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |

The application class

The application class is your starting point for scripting movies with QuickTime Player. This class provides access to movies, windows, and favorites, user preferences, and basic information about current QuickTime settings. You can tell this class to open a movie file, ask how many movies are currently open, or request a particular movie by name or index.

Class application: The QuickTime Player application program

Plural form:

               applications

Elements:

               movie by numeric index, by name

               window by numeric index, by name

               favorite by numeric index, by name

Properties:

               class type class [r/o]

                    -- the class

               name string [r/o]

                    -- the name

               frontmost boolean [r/o]

                    -- Is this the frontmost application?

                version version [r/o]

                    -- the version number of the application

play sound in background boolean

                    -- should sound of background movies be played?

               only front movie plays sound boolean

                    -- should only sound of front movie be played?

               play movie from beginning when opened boolean

                    -- should movies auto-play when opened?

               ask before replacing items in drawer boolean

                    -- Should alert be displayed when replacing a favorite?

               open movies in new player boolean

                    -- Should movies be opened in separate windows?

               QuickTime version version [r/o]

                    -- the version of the installed QuickTime

               QuickTime language international text [r/o]

                    -- the language of the installed QuickTime

               QuickTime connection speed 14.4 Modem/28.8/33.6

                    Modem/56K Modem/ISDN/112K Dual

                    ISDN/T1/Intranet/LAN [r/o]

                    -- the current connection speed (set in the QuickTime

                        Control Panel)

               QuickTime Pro installed boolean [r/o]

                    -- is the pro version of QuickTime installed?

Some examples of how you would use various properties of the application class:

-- get all movies --

               get every movie

-- get all windows --

               get every window

-- get all favorites --

               get every favorite

-- get class of app --

               get class of application "QuickTime Player"

-- get app name --

               get name of application "QuickTime Player"

-- is app frontmost? --

               get frontmost of application "QuickTime Player"

-- get app version --

               get version of application "QuickTime Player"

-- setting preferences --

               set play sound in background of application "QuickTime Player" to false

               set only front movie plays sound of application "QuickTime Player" to false

               set play movie from beginning when opened of application "QuickTime Player" to false

               set ask before replacing items in drawer of application "QuickTime Player" to false

               set open movie in new player of application "QuickTime Player" to false


© 2000 Apple Computer, Inc.

Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |