In article <9r7Rj.3676$26.2044@[EMAIL PROTECTED]
>,
Greg Ercolano <erco@[EMAIL PROTECTED]
> wrote:
> I'm trying to push the "Step Frame" button on DVD Player's
> little remote controller window via AppleScript.
Oh for crying out loud, why go through all that nonsense?
(snip)
> I'm probably missing a lot, since I've never worked with AppleScript.
Ok that explains it...
The big thing you are missing with AppleScript is that AppleScript was
designed to let you do things *without* scripting the user interface.
With AppleScript, you normally do not need to worry about windows,
buttons, menu titles, and so on. Instead, you simply tell the
application to do something.
You should know that user interface scripting is a feature that was
added to AppleScript just very recently, and only as a hack to let you
script applications that aren't already scriptable. DVD Player *is*
scriptable, so there's no need to go through UI scripting for it.
An application that is scriptable (a great many are) will have an
AppleScript dictionary that you can examine to see what commands and
cl***** the application accepts. To view the AppleScript dictionary of
any scriptable application:
1. Run Script Editor.
2. From menu bar, choose File > Open Dictionary.
3. Select the application in the list and open it. The AppleScript
dictionary will appear.
In this case, what you should do is take a look at DVD Player's
AppleScript dictionary. Notice there is a "step dvd" command. You'd
issue it like so:
tell app "DVD Player"
step dvd
end tell
Much easier, right? ; ) This is the true AppleScript way: you tell
apps to do things - you don't click buttons etc.
--
Please send all responses to the relevant news group. E-mail sent to
this address may be devoured by my very hungry SPAM filter. I do not
read posts from Google Groups. Use a real news reader if you want me to
see your posts.
JR


|