MACSCRPT Archives

December 2009

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Macintosh Scripting Systems <[log in to unmask]>
Mime-version:
1.0
Date:
Mon, 14 Dec 2009 12:20:21 -0800
Reply-To:
Macintosh Scripting Systems <[log in to unmask]>
Content-type:
text/plain; charset="US-ASCII"
Subject:
From:
"Stockly, Ed" <[log in to unmask]>
In-Reply-To:
Content-transfer-encoding:
7bit
Comments:
To: Chris Harbinson <[log in to unmask]>
Parts/Attachments:
text/plain (69 lines)
Sounds like you're manually typing your paths in.

Here's a better way to get a valid reference to put into your script:

Run this script in Script Editor.  Navigate to the script you want to load
into your script. When the dialog comes up, copy and paste the contents into
your script.

-----------

Set myScriptFile to choose file

Display dialog "Copy and paste this text into your script" default answer
myScriptFile as text

-------------


Inside your script I'd suggest this:
--------
Set myScript to ""-- paste the path here

Set myScript to myScript as alias -- this command will fail if the file
reference is no good

Load script myScript
-----------

I'd also suggest not pasting the path into your script, but assigning it to
a property whose value is set when the script is first run, or if the file
gets moved:

Property pathToScript:""

Try
Set pathToScript to pathToScript as alias
On error
Set pathToScript to choose file
End

HTH,


HTH

ES


On 12/14/09 12:11 PM, "Chris Harbinson"  wrote:

> Got the load script command working now.
> 
> Took out all the things that could complicate matters, like the
> version number on the script name.
> 
> Added the invisible file extension ... out of sight, out of mind.
> 
> Tried it in the Applications folder... it worked; tried it in the
> Photoshop folder... it worked; Settings folder ... success again;
> Scripts folder ... happy days!
> 
> But the next sub-folder was a folder too far.
> 
> So in the Scripts folder it shall reside!
> 
> Thanks again for your help
> 
> Chris

ATOM RSS1 RSS2