Jump to content
Salesforce and other SMB Solutions are coming soon. ×

QT Script


100mph

Recommended Posts

I currently have a database of video clips I have been gathering for my thesis. I would like to be able to show these clips full screen to an audience at my thesis review. Does anyone know a script for FM9.0 Advanced that will allow me to click on my embedded QT clip in the database and have it launch QT in another window and play the clip full screen???

 

Thanks!

Link to comment
Share on other sites

Did you use Insert QuickTime or did you use Insert File?

 

If you used Insert QuickTime, it only inserts a reference to the movie, which means that IF the path to the movie (on the file server or your local HD or whatever) is the same as it was when you inserted it, you can simply make a layout with a huge container field and have a script that does this:

 

Go to Field [yourtable::yourContainerField, select/play]

 

 

If on the other hand you inserted it as a FILE, export field contents to a path, I see you're on a Mac the easy Mac path export is

 

Set Variable [$ExportPath, Get(DesktopPath)&"/Movie.mov"

Export Field Contents, [$ExportPath, no dialog]

 

Then you can perform calculated AppleScript, umm I don't know the syntax for telling QuickTime Player to play a specified file but you can probably dig it out as easily as I could by Googling "QuickTime Player" + "end tell" in advanced search.

Link to comment
Share on other sites

Thanks for the help.

I've inserted all the clips as QT files (not as file paths), via right click on my mouse in the container field. I have never scripted in FM before so I'll take a read through the Help.

Link to comment
Share on other sites

Well, the following AppleScript launches and plays a QuickTime document:

 

tell application "Finder"

activate

open document file "themoviename.mov" of folder "Desktop" of folder "AHunter3" of folder "Users" of startup disk

end tell

tell application "QuickTime Player"

tell document 1

play

end tell

end tell

 

So if you export to the desktop, to a hardwired location of your choosing, you should be able to send AppleScript to make the file play.

 

Set Variable [$QTPath, Get(DesktopPath) & "/themoviename.mov"]

Export Field Contents [no dialog, replace existing file, $QTPath]

Set Variable [$QMk, """"]

Comment ["now to create the AppleScript text"]

 

Set Variable [$AppleScript, "tell application "&$QMk&"Finder"&$QMk&"¶" &

"activate"&"¶"&

"open document file "&$Qmk&"themoviename.mov"&$Qmk&" of folder "&$Qmk&"Desktop"&$Qmk&" of folder "&$Qmk&"100mph"&$Qmk&" of folder "&$Qmk&"Users"&$Qmk&" of startup disk" & "¶" &

"end tell" & "¶" &

"tell application "&&$Qmk&"QuickTime Player"&$Qmk& "¶" &

"tell document 1" & "¶" &

"play" & "¶" &

"end tell" & "¶" &

"end tell"

 

Comment ["now to execute the AppleScript"]

 

Perform AppleScript [calculated value, $AppleScript]

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use