Re: Setting STR# resource entries via AS
Re: Setting STR# resource entries via AS
- Subject: Re: Setting STR# resource entries via AS
- From: John Delacour <email@hidden>
- Date: Thu, 28 Nov 2002 20:57:17 +0000
- Mac-eudora-version: 5.3a10
At 1:31 pm -0500 28/11/02, Gary Lists wrote:
However, the intended application [1] is have the end user supply the string
values and then move those into the file's resource. Just copying a resedit
file into the destination works fine, but accessing specific indices within
each resource is failing for me.
Try this. I've used the Satimage osax for this, since I'm running OS
10, but the same principle applies whatever you use. Strings are
limited to 256 characters for obvious reasons.
set f to "" & (path to desktop) & "junk.txt"
open for access file f
close access file f
set stringlist to words of "one three five"
set s to ASCII character 0
set s to s & (ASCII character (count stringlist))
repeat with i in stringlist
set c to ASCII character length of i
set s to s & c & i
end repeat
put resource s to file f type "STR#" index 256 with name "test"
tell app "Finder" to open file f using application file id "RSED"
JD
_______________________________________________
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.