Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Applescript > Re: How to hit ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 1605 of 1647
Post > Topic >>

Re: How to hit the 'Step Frame' button in "DVD Player" with applescript?

by Jolly Roger <jollyroger@[EMAIL PROTECTED] > Apr 27, 2008 at 08:39 PM

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
 




 3 Posts in Topic:
How to hit the 'Step Frame' button in "DVD Player" with applescr
Greg Ercolano <erco@[E  2008-04-27 15:50:44 
Re: How to hit the 'Step Frame' button in "DVD Player" with appl
Jolly Roger <jollyroge  2008-04-27 20:39:06 
Re: How to hit the 'Step Frame' button in "DVD Player" with appl
Greg Ercolano <erco@[E  2008-04-28 07:12:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 0:09:32 CDT 2008.