• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: read script file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >read script file (From: Wayne Melrose <email@hidden>)
 >Re: read script file (From: Joe <email@hidden>)

  • Prev by Date: Re: read script file
  • Next by Date: Auto: AppleScript-Users Digest, Vol 6, Issue 351
  • Previous by thread: Re: read script file
  • Next by thread: Auto: AppleScript-Users Digest, Vol 6, Issue 351
  • Index(es):
    • Date
    • Thread