Re: Unicode encoding and store script
Re: Unicode encoding and store script
- Subject: Re: Unicode encoding and store script
- From: Shane Stanley <email@hidden>
- Date: Wed, 11 May 2011 12:25:00 +1000
- Thread-topic: Unicode encoding and store script
On 11/5/11 3:42 AM, "Antonino Petriliggieri" <email@hidden> wrote:
> 1) trying to use "store script" command in ASOC compiles correctly
> but gives a run time error of "can't covert <<scpt>> into script"
>
> Is this standard addition command forbidden or does it requires
> special syntax?
It doesn't work, and I can't see any way to make it work. If you use load
script and ask for the resulting script's class, it says
<<NSAppleEventDescriptor: 'scpt'>. Unfortunately there doesn't seem to be a
coercion to AS script object available. (A general coercion command that
coerced NSAppleEventDescriptors to AS objects would be a wonderful thing...)
>
> 2) All my script files where created in xcode default encoding that
> is UTF-8, but Script Editor don't read correctly UTF-8 files, so I
> used xcode editor to convert script files to Unicode just to discover
> that all my outlets and actions where dimmed in Interface Builder and
> no longer available.
I suggest leaving them as UTF-8. The problem is that AppleScript Editor
doesn't recognise UTF-8 files without a BOM. The solutions are:
* Use a script editor that does recognise them. Script Debugger does, Smile
probably does, and AppleScriptObjC Explorer does.
* Open them in a word processor that recognises them, and copy the content
to ASE. You could probably write a script to do it via BBEdit/TextWrangler.
This assumes Xcode will handle the file OK with a BOM -- give it a try and
let us know if it worked.
FWIW, AppleScriptObjC Explorer might give you good enough logging so that
you don't have to keep your InDesign and ASObjC scripting completely
separate.
Anyway, I suggest you log both issues as bugs.
(Disclaimer: I wrote AppleScriptObjC Explorer, so expect bias.)
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden