Re: Script Editor vs command line = different results
Re: Script Editor vs command line = different results
- Subject: Re: Script Editor vs command line = different results
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 08 Jul 2004 16:44:11 -0700
On 7/8/04 4:21 PM, "Andersen Studley" <email@hidden> wrote:
>
This code yields a "Can't make xxx into a file" error, no matter how I
>
save the script
>
>
set theScript to (load script "Users:me:Desktop:scpt:test.scpt")
>
--[.app | .scptd | .applescript]
>
run script theScript
1. You're trying to load a string, not a file.
2. If you're hard-coding the file-path like that, you need to begin with the
name of the disk that "Users:" is on
set theScript to (load script alias "Macintosh
HD:Users:me:Desktop:scpt:test.scpt") -- all one line
run script theScript
Note the dictionary for 'run script' says
run script script -- the script text (or an alias or file reference of a
script file) to run
So you don't even need to load it:
run script (alias "Macintosh HD:Users:me:Desktop:scpt:test.scpt")
Or you can load it and then just run it, without another scripting addition:
set theScript to (load script alias "Macintosh
HD:Users:me:Desktop:scpt:test.scpt") -- all one line
run theScript
They all work.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.