Hello
I think you have done great so far.
I have two proposals for your last pieces of code *much* shorter , which I would have tried if I was the one who wrote your script. For the lack of not coming up with a better solution at the moment I'd try using printf via a do shell script, and trying converting to the © symbol by the iconv utility also via a shell script.
on character conversion.
I don t know if you know this, but using google site operator is great for finding stuff. I entered this in my google bar : site:macscripter.net hexadecimal and voila:
In general, I'm so glad for having the possibility to do a do shell script command, and getting access to all of the bsd commands, and even installing tools as I like it from a plethora of source trees in order to get a job done by not having to inventing my own tool all of the time.
I'd want folder actions or / and other system wide event hooks, like on windows, with full access to the cocoa framworks from applescript as my number one wish for applescript. Spotlight would also be nice.
Regards
Tommy Bollman
--------------------
No act of kindness, no matter how small, is ever wasted. -- Aesop
On 18. mai 2010, at 13.34, Thomas Fischer wrote: Hello,
I used the various hints and now have a a version which pretty much does what I need. Alas, I can't copy it here as used because Mail will not accept ASCII 0, but I can use "character id 0":
set myFile to choose file set myInfo to do shell script "mdls -raw -name kMDItemCreator -name kMDItemEncodingApplications " & (quoted form of (POSIX path of myFile)) set myInfo to change "[ \"\\(]*\\r[ \"\\)]*" into "" in myInfo with regexp set myInfo to change character id 0 into ", Producer: " in myInfo tell application "Finder" to set comment of myFile to "Creator: " & myInfo
This uses the Satimage Osax to search and replace text with regular expressions. In case anybody wonders: I want to make the creator of TeX-based PDF files visible in the Finder window as comments. Different creators/producers create different problems when trying to convert PDF to text, so that makes the differences easier to check.
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
|