Simple newbie question

Hi there, i’m a newbie to applescripting and have a very pressing deadline to solve a simple thing that a program i’m using can not do by itself …

this is it :

at starting up the computer
i want to open a file named ‘setup.md8’ in the application ‘modul8’
…wait until the file has loaded …
and select from the menu bar ‘Output’ (6th menu item counting from left to right, starting after apple menu) → the item ‘Fullscreen’ (second in the list)

that’s it …

i know it can’t be too hard to do, but i have no clue and am in desperate deadline stress…
any help would be greatly appreciated !

gideon

It may well be nearly impossible to do if modul8 is not AppleScriptable. To tell, open the Script Editor and under the File menu choose “Open Dictionary”. Navigate down the page that opens (or type m to speed that up) and see if modul8 is listed. If not, then you probably cannot script it.

You can open your doc as follow:

tell app "Finder" to open alias "path:to:file.md8"

I don’t know what is this “modul8”, but this will work if you double-click the “file.md8” in the Finder and it is opened automatically by “modul8”. Otherwise, find “modul8”'s creator type (CFBundleSignature) or CFBundleIdentifier, and use it as follow:

tell app "Finder" to open alias "path:to:file.md8" using application file id "MOD8"

Later, read this one:
http://macscripter.net/faq/applications.php?id=P92
If you read and follow the links, you will find your answer very quick. Good luck! :wink:

Thanks for your help ! That all works pretty well.
I’m now using the extrasuites from Kanzu to select the menu item, i’ll investigate howto do this using the free apple ui scripting, any help appreciated :wink:
Also, i have to build in some wait times, it would be great if those could be variable, depending on the time the modul8 application takes to load in the file … but i guess i’d have to dig into modul8 to find some ‘ready’ message ?

anyways, the basic setup works swell… now some finetuning left … thanks again !