• 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: Converting "scpt" resource to text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting "scpt" resource to text


  • Subject: Re: Converting "scpt" resource to text
  • From: Mike Miller <email@hidden>
  • Date: Mon, 30 Jul 2001 13:04:04 -0500

At 10:41 AM +0300 7/30/01, Douglas Wagner wrote:
>I've extracted a "scpt" resource from a FaceSpan project using Latenight's "Resource IO". I believe the result is a binary.
>
>Can anyone tell me how I might convert this to a readable form, within Applescript, or by using a Scripting Addition?

Save the 'scpt' resource with number 128 in a file marked for the Script Editor (file type "osas", creator code "ToyS"). You can then open it in the Script Editor.

Most FaceSpan apps only have one 'scpt' resource: the Project Script. It's already stored as 'scpt' 128, so you can open it in the Script Editor with just a file type and creator code change. (Other script editing apps may be able to open them directly.)

You can view scripts with FaceSpan:

on hilited theObj
set theFile to choose file with prompt "Select a file:"
try
set itsScript to load script theFile
set itsText to itsScript as text
set contents of textbox "txtScript" to itsText
on error errTxt number errNum
set contents of textbox "txtScript" to errTxt & return & errNum
end try
end hilited

If you're digging out scripts from other places (storage items or windows), you'll have to save as 'scpt' 128 or convince FaceSpan that the data is a script before you can extract text from it.

Note that none of this will work if the script was saved read-only.

Hope this helps,

Mike Miller
ESG Labs
http://www.esglabs.com/


  • Follow-Ups:
    • Re: Converting "scpt" resource to text
      • From: Jon Pugh <email@hidden>
  • Prev by Date: set variable to pict file contents? Set file icon to variable?
  • Next by Date: Re: Trying again and sharing results
  • Previous by thread: Re: Converting "scpt" resource to text
  • Next by thread: Re: Converting "scpt" resource to text
  • Index(es):
    • Date
    • Thread