File Open Dialog Manipulation with GUI Scripted App


I’m writing a script that will automate the process of converting a song into a format suitable for my gf’s mobile phone. Due to some silly DRM badness on her mobile, she can only songs if they are encoded as a SMAF.

I’ve tracked down a little app from Yamaha (who developed the SMAF/MMF spec):

Since the wscma2u app doesn’t expose an Applescript interface, I’m using GUI scripting. I’ve done the easy, activiating the app and displaying a ‘File Open’ dialog, but I don’t know how to proceed from there. How do I set the path and filename (I would already know both items) of the file dialog? Can I use Applescript for this or would I have to use GUI scripting?

Any help would be greatly appreciated.!

tell application "wscma2u"
end tell

tell application "System Events"
	tell process "wscma2u"
		click the menu item "Open..." of the menu "File" of menu bar 1
	end tell
end tell



BTW: I’m new at this! :slight_smile: