• 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: 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

  • Follow-Ups:
    • Re: read script file
      • From: Wayne Melrose <email@hidden>
References: 
 >read script file (From: Wayne Melrose <email@hidden>)

  • Prev by Date: read script file
  • Next by Date: Re: read script file
  • Previous by thread: read script file
  • Next by thread: Re: read script file
  • Index(es):
    • Date
    • Thread