Re: read script file
Re: read script file
- Subject: Re: read script file
- From: Wayne Melrose <email@hidden>
- Date: Mon, 03 Aug 2009 20:24:51 +0200
On 3. aug.. 2009, at 19.37, Joe wrote:
At 7:13 PM +0200 8/3/09, Wayne Melrose wrote:
is there a way to read a .scpt file's contents without actually
opening it in Script Editor?
In the same way that you can read a text file..
example
do shell script "cat /path/to/file.txt"
Using this with a .scpt file of course returns something other than
you'd expect.
Thanks for any help.
As I learned from the folks on this list:
set thisScript to choose file
set thePath to thisScript as text
set poxPath to POSIX path of thisScript
set qfPoxPath to quoted form of poxPath
set theScript to do shell script "/usr/bin/osadecompile " &
qfPoxPath & "| /usr/bin/tr -d '\\000'"
HTH
Joe
Oh they're a good bunch the folks on this list... ;)
Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden