Jump to content

Quicktime and Filemaker script impossible quest


This topic is 3380 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I use successfully this FMP and Applescript combined script from within filemaker to open clips we choose from our FMP file:
 
Let ( 
mac_path = Right ( Substitute ( Media Path; "/"; ":"); Length (Media Path) - 1);
 
"tell application "Quicktime 7"" & ¶ & 
"activate" & ¶ & 
"open " & Quote ( mac_path ) & ¶ & 
"
set the dimensions of movie 1 to {480, 270}
" & ¶ & 
"end tell"
)
 
the script calls the clip in QT and plays it
However I would like to be able to play the movie from a specific frame
 
I have this Applescript which works perfectly within FMP using the NATIVE APPLESCRIPT FUNCTION attached to a button.
 
set film to (choose file with prompt "Choose film.")'s POSIX path
set frame_number to 40
set fps to 25
 
tell application id "com.apple.quicktimeplayer" -- QuickTime Player 7
tell (open film as POSIX file)
set current time to frame_number / fps * time scale
end tell
end tell
 
However I have a field [frame] with a frame as integer and I don't need to select the movie as I have the let (mac_path = Right ( Substitute ( Media Path; "/"; ":"); Length (Media Path) - 1) ;) function to convert the path file from the field in my db
 
I tried to add this portion of the Applescript in my script but the script opens the file and puts the playhead at the beginning of the movie. 
 
This is what I did, but I am not able to make it work. 
 
Let ( 
mac_path = Right ( Substitute ( Media Path; "/"; ":"); Length (Media Path) - 1);
"set frame_number to "  & Frames & ¶ & 
"tell application "Quicktime 7"" & ¶ & 
"activate" & ¶ & 
"open " & Quote ( mac_path ) & ¶ & 
"set current time to frame_number " & ¶ & 
"set the dimensions of movie 1 to {480, 270}" & ¶ & 
"end tell"
)
 
I am aware the script only works if the movie has a timecode track. It won't work otherwise. 
 
Is there a way to fit the "set current time to frame_number " & ¶ & 
of the Applescript in FMP?
 
Thanks and Regards
 
Dan
 
Link to comment
Share on other sites

This topic is 3380 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.