Re: Question about Satimage OSAX
Re: Question about Satimage OSAX
- Subject: Re: Question about Satimage OSAX
- From: Steve Thompson <email@hidden>
- Date: Tue, 7 Jan 2003 16:56:12 +0000
Emmanuel,
Thank you for your reply. However, in my first posting, I stated that
put resource (temp as text) to tpath type "TEXT" index solCount with
name "Steve"
Also creates a resource named "flat"
In fact, the (temp as text) part of my script works fine. It is the
"with name xxx" part that doesn't work. Unless you are saying that the
SatImage dictionary is wrong and the name and the type should be the
other way round?
What I think the problem is is that SatImage doesn't work in
AppleScript Studio.
Steve
On Tuesday, January 7, 2003, at 09:00 am, Emmanuel wrote:
At 4:04 PM +0000 03/01/03, Steve Thompson wrote:
put resource (temp as text) to tpath type "TEXT" index solCount with
name prefName
every time, this creates a resource with the contents
of temp (correct), an index of solCount (correct) and a name of "flat"
(Huh?).
Unfortunately, the Name part is important. If someone could tell me
how
I should be passing the name (obviously not as text) I'd be most
grateful.
As you could observe, Philippe Gruchet could name his "TEXT" resource
and you could not. Here is why.
If the quantity that you attempt to write as a resource is a list or a
record, the Satimage osax forces the name of the resource to "flat"
for its internal use. (This is because the internal AppleScript format
for records has changed, and "load resource" will try to guess whether
it's reading an old or a new one).
(More generally, you may want to know that "load resource" uses the
name of the resource - if that name has four characters - as the
four-character code of the type wanted for the result.)
What happens to you probably, Steve, is that your "temp as text" does
not really produce raw text - you're probably facing a Unicode issue.
For testing purposes, you may want to replace "temp as text" with an
explicit string, and check that the "put resource" then names the
resource correctly.
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.