image
image

|


Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old August 15th, 2002, 12:42 PM
Registered User
 
Join Date: Feb 2002
Location: Earth
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
cclear is on a distinguished road
APPLE script help Please!!!

Please help a newbie-apple-scripter out..
I just want to have a simple little apple script to launch a DVD movie folder that is stored on my HD.. basicly, lets say I have a bunch of DVD's copied on to the HD for play back ( I don't yet, but I will later ) I want a simple apple script .app that I can click to launch a movie..

say I have a Script .app that is called Moulin Rouge. When Clicked, It launches the video_ts folder and plays fullscreen on the Screen

I KNOW the syntax is incorrect, but this is what I want to do, how do I say it right??

tell application "DVD Player"
activate
open folder in "VIDEO_TS" in folder "MoulinRouge" in folder "DVD" on hard drive "Bob's_HDrive" on computer "Bob"
Play full screen
end tell


The idea is to take this and just copy the script for whatever movie I wish to have a script .app -- I just have to change the name of the script and the path..

what is the syntax for a file path in applescript??

Last edited by cclear; August 15th, 2002 at 12:52 PM.
Reply With Quote
  #2  
Old August 15th, 2002, 08:11 PM
Registered User
 
Join Date: May 2002
Location: New Zealand
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
scaryfish is on a distinguished road
I believe it's "of folder" and "of disk".

The easiest way, however, is this:
In the finder, find the folder you want the path to. Select it and choose copy from the edit menu. Go into script editor, put the cursor where you want the path and go to edit>paste reference. Hey presto, you've got the full path to the folder.
__________________
=)
<><
public key id: EE4B2E09
Reply With Quote
  #3  
Old August 15th, 2002, 10:37 PM
Registered User
 
Join Date: Feb 2002
Location: Earth
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
cclear is on a distinguished road
Scaryfish: thanks!! paste reference is very cool..

I still can't get the exact syntax to work yet..

the path is correct, but how do I tell the "DVD player" to open the "TS_FOLDER" and then tell it to play it at full screen
( because the DVD player by default doesn't automaticly start playing DVD folders, and it is in a window viewer )

see below for what I got so far..(applescript app) I still just can't seem to find anything to help me narrow down syntax for telling the DVD player what I want it to do..

tell application "DVD Player"
activate
open folder "VIDEO_TS" of folder "Moulin Rouge" of folder "DVD" of startup disk
Play
Viewer at Full Screen
???????
end tell
quit
Reply With Quote
  #4  
Old August 15th, 2002, 11:24 PM
Registered User
 
Join Date: May 2002
Location: New Zealand
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
scaryfish is on a distinguished road
Ok, try this: Go into script editor, go to file>open dictionary. Select your DVD player from the list and click ok.

This gives you a list of all the commands the player understands, and their syntax.

I don't have DVD player 'cause I don't have a DVD drive, so I can't really help from experience.
__________________
=)
<><
public key id: EE4B2E09
Reply With Quote
  #5  
Old August 16th, 2002, 11:50 AM
Registered User
 
Join Date: Feb 2002
Location: Earth
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
cclear is on a distinguished road
scaryfish: thanks for your help so far.. I know this is probably simple stuff, I just haven't got a grip on it yet...
man, I don't know why I didn't look at the dictionary b4.. VERY cool..

I am just 1 step away now from getting this to work.. ( this is the first script I have ever made!! it is very exciting.. iknowiknow goofy cheezy little thing.. but apple script is soo COOL!! especially with dictionary to narrow things down.. I am no programmer, but I would be cool to make little simple scripts and such...

I am still having issues getting the script to see the path name - everything below works correctly, but it doesn't seem to accept the file structure.. under dictionary for opening a VIDEO_TS ( thats what I need ), it says
open VIDEO_TS file specification -- file reference to VIDEO_TS folder

but when I try it - it gives me a
(expected end of line,ect. but found " )
and highlights the first quotation here / of folder (")moulin rouge" /

I did the paste reference, so the path is correct, what am I missing?
the other commands are correct as well now..

tell application "DVD Player"
activate
open VIDEO_TS of folder "Moulin Rouge" of folder "DVD" of startup disk
set viewer full screen to true
play dvd
end tell
quit

Last edited by cclear; August 16th, 2002 at 01:12 PM.
Reply With Quote
  #6  
Old August 16th, 2002, 04:01 PM
Registered User
 
Join Date: May 2002
Location: New Zealand
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
scaryfish is on a distinguished road
Ok, I think I see what's happening here. Try this:
open VIDEO_TS "Moulin Rouge" of folder "DVD" of startup disk

If VIDEO_TS isn't actually part of the file specification, it's type of file. For example, if you wanted to reference a file you'd say:
file "filename" of folder "foldername" of startup disk
or if you wanted to reference a folder you'd say:
folder "foldername" of startup disk

Let me know if it works/doesn't work.
__________________
=)
<><
public key id: EE4B2E09
Reply With Quote
  #7  
Old August 16th, 2002, 04:23 PM
Registered User
 
Join Date: Feb 2002
Location: Earth
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
cclear is on a distinguished road
wow... I got something new now..
first of all, just so you know, VIDEO_TS is a folder.. it is where all the DVD files are stored.. ( if you look at the dir-structure of a DVD, there is a VIDEO_TS folder at the top. so that is what needs to be referenced..

but get this.. I just did the copy-reference thingy, and it gave a new syntax that I haven't seen..

tell application "DVD Player"
activate
open VIDEO_TS «class cfol» "Moulin Rouge" of «class cfol» "DVD" of «class sdsk»
set viewer full screen to true
play dvd
end tell
quit

?? now, the applescript accept this as a correct syntax now.. so the script seems to be good to go BUT it wont' run, when I run it i get a

Can't get «class cfol» "DVD" of «class sdsk».

for some reason it can't see DVD folder?? hmmmmmmmm
Reply With Quote
  #8  
Old August 16th, 2002, 07:48 PM
Registered User
 
Join Date: May 2002
Location: New Zealand
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
scaryfish is on a distinguished road
Ah, yep, those &lt;&lt;class cfol&gt;&gt; things are appleevent tags. Basically, those are what AppleScript actually changes your script references into before passing them to the player. I'm not sure why they show up in the script from time to time, but don't worry about them.

I'm not sure what the trouble is now. Try this:
Create a new script. Open your DVD player.
In Script Editor, click the Record button.
Go to the player, and try to play the DVD using your normal method. (I dunno, File>Open or whatever)
Stop the DVD, then go back to Script Editor and click stop.

Have a look at what's in the script window now - if there's anything there. That might (if the DVD player's recordable) give you an idea of how to do it.

If that doesn't work, try changing your file reference to the following (I'm just guessing here)
open VIDEO_TS "VIDEO_TS" of folder "Moulin Rouge" of folder "DVD" of startup disk
or
open folder "VIDEO_TS" of folder "Moulin Rouge" of folder "DVD" of startup disk
or
open file "VIDEO_TS" of folder "Moulin Rouge" of folder "DVD" of startup disk
or even just
open "VIDEO_TS" of folder "Moulin Rouge" of folder "DVD" of startup disk

I'm not sure which (if any) of these will work.
__________________
=)
<><
public key id: EE4B2E09

Last edited by scaryfish; August 16th, 2002 at 07:56 PM.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apple- Yesturday, Today, and Tomorrow GroundZeroX Opinions, & Open Letters 19 May 9th, 2005 06:56 PM
InfoWorld Special Report: Apple Unpeeled Michael Watson Apple News, Rumors & Discussion 4 November 24th, 2002 08:22 AM
Future of Apple With x86 pezagent Apple News, Rumors & Discussion 28 August 26th, 2002 11:41 AM
Apple observations and opinions TellarHK Apple News, Rumors & Discussion 4 May 30th, 2002 11:36 PM
Apple: Forget XP, try the Mac tagliatelle Bob's Place 1 November 25th, 2001 06:12 AM


All times are GMT -5. The time now is 07:47 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.