Re: read script file
Re: read script file
- Subject: Re: read script file
- From: Joe <email@hidden>
- Date: Mon, 3 Aug 2009 10:37:45 -0700
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
_______________________________________________
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