Re: Using terms from syntax
Re: Using terms from syntax
- Subject: Re: Using terms from syntax
- From: has <email@hidden>
- Date: Thu, 22 Sep 2005 22:34:43 +0100
David LeBer wrote:
>I'm having problems getting my script to compile, for instance, this compiles:
>
>using terms from application "Macintosh HD:System Folder:Control Panels:File Sharing"
>
>This doesn't:
>set startupDisk to path to startup disk as string
>set filesharingPath to startupDisk & "System Folder:Control Panels:File Sharing"
>using terms from application filesharingPath
That's because 'using terms from' is a compiler directive - it's used when source code is compiled, not when compiled code is executed.
>My utility sets a bunch of things up, configures some plists, etc, one of the final things I need to do is set the Classic machine name (for some legacy software) but because the Classic environment has never been run when my utility launches I get stopped by the Choose Application dialog looking for "File Sharing".
This has nothing to do with 'using terms from'; it's your 'tell application "File Sharing"' block that's the problem. You need to determine the target application dynamically, and wrap it in a 'using terms from' block that points to your local copy to get it to compile. (It's a kludge.)
HTH
has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden