Applescript in Leopard

Javier Diaz-Reinoso javier_diaz_r at mac.com
Sun Dec 9 21:18:51 UTC 2007


I tested the Squeak front-end to Applescript in Mac OSX 10.5, using
Squeak3.9-final-7067 and is working OK.

Because AppleScript 2.0 (included with 10.5) is "now entirely Unicode- 
based" according to Apple, some statements with unicode strings work  
now, such as:

> ba := #(0 16r22 0 16r28 16r5B 16r5D 16r7D 16rEC 0 16r29 0 16r22)   
> asByteArray.
> bs := ba asString.
> ws := bs convertFromWithConverter: UTF16TextConverter new.
> Applescript doIt: 'display dialog (', ws, ' as Unicode text)'

and if you select a file with unicode characters in the name:

> bs := Applescript selectAnyFile.
> Applescript doIt: 'display dialog (', bs, ' as Unicode text)'

what don't work (using Squeak 3.8.18beta1U VM) is using the clipboard,  
directly or using the 'copy name to clipboard' from the file list  
browser, probably the VM need some modifications.






More information about the Squeak-dev mailing list