• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: osadecompile misfires with 2 Apple supplied scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: osadecompile misfires with 2 Apple supplied scripts


  • Subject: Re: osadecompile misfires with 2 Apple supplied scripts
  • From: Axel Luttgens <email@hidden>
  • Date: Wed, 3 Sep 2008 17:46:21 +0200

Le 2 sept. 08 à 17:41, Joe a écrit :

[...] It won't break my fingers to copy - paste two scripts from Script Editor ;-)

Hello Joe,

I haven't investigated a lot, but here follow some hints.
Let's start with this one:

do shell script "/usr/bin/osadecompile '/Library/Scripts/Mail Scripts/ Import Addresses.scpt'"
characters of result
--> {"(", "*", "
", "", "I", "", "m", "", "p", "", "o", "", [...] "p", "o", "r", "t"}


Some strange "" characters thus appear at the beginning of the script as returned by osadecompile; in fact, those characters seem to appear within the first block comment only.
Let's have a look at one of those characters:


do shell script "/usr/bin/osadecompile '/Library/Scripts/Mail Scripts/ Import Addresses.scpt'"
id of character 4 of result
--> 0


Hmm, a null character; no wonder to have FileMaker behaving "strangely".
BTW, it is interesting to run "hexdump -C" against the script: the comment appears twice, as if there were an utf16 as well as an utf32 version of it.


Anyway, a slight change in your script seems to do the trick:

set theScript to do shell script "/usr/bin/osadecompile " & qfPoxPath & "| /usr/bin/tr -d '\\000'"

It works with "pathological" scripts, such as the above "Import Addresses.scpt", as well as with "regular" ones.
So, there's perhaps no need at all to break fingers?


HTH,
Axel _______________________________________________
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
  • Follow-Ups:
    • Re: osadecompile misfires with 2 Apple supplied scripts
      • From: Joe <email@hidden>
References: 
 >Re: osadecompile misfires with 2 Apple supplied scripts (From: Axel Luttgens <email@hidden>)
 >Re: osadecompile misfires with 2 Apple supplied scripts (From: Joe <email@hidden>)

  • Prev by Date: Re: Dialog command
  • Next by Date: Re: osadecompile misfires with 2 Apple supplied scripts
  • Previous by thread: Re: osadecompile misfires with 2 Apple supplied scripts
  • Next by thread: Re: osadecompile misfires with 2 Apple supplied scripts
  • Index(es):
    • Date
    • Thread