Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automated Script Compilation



On Nov 6, 2009, at 5:24 PM, Kyle Sluder wrote:

Now that AppleScript no longer requires a WindowServer connection, and
static sdefs can be used for terminology without launching their
containing app, we're once again attempting to build our Automator
actions as part of our build process.  Unfortunately, osacompile
doesn't seem to want to be given an sdef, insisting on finding the
application for itself.  (The app in question still uses old-style
.scriptTerminology, but it's no big deal for me to manually run
sdef(5) if it means that the actual compilation happens automatically
on our build server.)

Has anyone been able to compile their scripts headlessly?

I don’t think this is possible, but would be happy to be wrong.

I don’t have a situation where I need to build headlessly, but I do have 2 situations in which it would be nice to do this:

1) Chicken and egg problem where building automator actions for Product X requires Product X in order to compile the scripts

2) Building Product Y compiles a script that talks to any number of apps which may not be on every build machine.

To solve problem #2, I just write the portion of the scripts which address applications not part of a stock Mac OS X install using raw chevron syntax. It isn’t necessarily pretty, and requires understanding how how AppleScript generates object specifiers (because sometimes you need to throw in an ‘of it’ where you wouldn’t need to when using english syntax), but it gets the job done.

- Jim _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-implementors/email@hidden

This email sent to email@hidden
References: 
 >Automated Script Compilation (From: Kyle Sluder <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.