Applescript help please - Mpeg Streamclip (GUI)

Joined
Mar 15, 2012
Messages
1
Reaction score
0
Points
1
Hey ^-^

I'm trying to write a script for auto conversion of a selected file in the finder to .mov (DV-pal), using Mpeg Streamclip. the specific conversion settings I'm looking for are:
Quicktime movie (this will be done through the "Convert to other formats" option, since the convert to quicktime movie has some bugs) > mov dv-pal, highest quality, 25 fps, de-interlaced.
Since mpeg streamclip is not apple-scriptable, I'm writing this as a GUI script.

This is what Iv'e got so far-

Code:
---This makes the script run on the selected file in finder

tell application "Finder"
	activate
	open selection using application file "MPEG Streamclip.app" of folder "Applications" of startup disk
end tell

set appName to "MPEG Streamclip"

try
	
	---This runs the app
	
	tell application appName
		activate
	end tell
	
	
	tell application "System Events"
		
		delay 0.2
		
		---This is file>export to other formats
		
		click menu item "Export to Other Formats…" of menu "File" of menu bar item "File" of menu bar 1 of application process "MPEG Streamclip" of application "System Events"
		delay 0.1

		
		---This is entering the Options window
		
		tell window "MPEG Streamclip - Other Formats"
			click button "Options..." of window "MPEG Streamclip - Other Formats" of application process "MPEG Streamclip" of application "System Events"
		end tell
		
		---This is to press "Settings" > [B]This is where the problem is.[/B]
		
		tell window "Movie Settings"
			click button "Settings…" of group 1 of window "Movie Settings" of application process "MPEG Streamclip" of application "System Events"
		end tell
		
	end tell -- tell application "System Events"
	
end try


It all seems to work fine, up until the "Settings" button part.
I tried writing this line with and with out the "group 1" part (I thought this might be the problem since this window has 2 different buttons called "Settings...", one for audio and one for video - I'm looking for the video one).
If you want, I can make a screen shot of the specific window and button I'm trying to press.

I'm pretty new to apple scripting, this is just what I picked up over the last couple of days.. But I really need some help with this. Having a script like this one will save me a lot of time spent putting in the same settings over and over again.

I already know how to put in the rest of the settings I need, so I just need help with this one thing for the script to work.

Thanks :)
 
Joined
Aug 13, 2011
Messages
200
Reaction score
7
Points
18
Location
West Sussex
UI scripting can get a bit complex, I dont like to steer people away from the great Mac Forums, but you
need expert Applescript help with this one, so I would suggest you visit the MacScripter forums at the lnk
below, there are some really smart Applescripters over their, but do come back and visit here with more
general Applescript questions.

MacScripter

Regards Mark
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top