• 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: Email to Script Debugger or Script Editor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Email to Script Debugger or Script Editor


  • Subject: Re: Email to Script Debugger or Script Editor
  • From: Christopher Stone <email@hidden>
  • Date: Thu, 19 Nov 2015 11:33:02 -0600

On Nov 19, 2015, at 09:22, Yvan KOENIG <email@hidden> wrote:
If I read well, the script replace non breaking spaces by standard ones but do that to all of them, even if some are included in strings used by an instruction.
______________________________________________________________________

Hey Yvan,

True.

But I don't often see anyone using NBSes in their code, and it's difficult to exclude quoted strings with embedded NBSes without making more than one pass.

If I continue to read well it seems that there is no code to replace curly quotes by straight ones although its something which appear very often. Of course, like the non-breaking spaces, we may have curly quotes embedded in strings which must remain unchanged.

Like NBSes I don't often see people using smart-quotes in their code.

I have another 'Zap-Gremlins' script I use if my script won't compile, although I might just add SQ's into the email-to-Script-Debugger script.

The cng handler is pretty straightforward, so you can make alterations as you like.

cng(<RegEx-FindStr>, <RegEx-ReplaceStr>, _text)

set myStr to "“Now is the ‘time’ for all good men to come to the aid of their country.”"
set myStr to cng("[“”]", "\"", myStr) of me
set myStr to cng("[‘’]", "'", myStr) of me

The default regex syntax for the Satimage.osax is Ruby.

http://userguide.icu-project.org/strings/regexp#TOC-Regular-_expression_-Metacharacters

--
Take Care,
Chris

 _______________________________________________
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

References: 
 >Email to Script Debugger or Script Editor (From: Christopher Stone <email@hidden>)
 >Re: Email to Script Debugger or Script Editor (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: applescripting sub mailboxes in Mail
  • Next by Date: Reading AppleScripts on iOS Device
  • Previous by thread: Re: Email to Script Debugger or Script Editor
  • Next by thread: Re: Email to Script Debugger or Script Editor
  • Index(es):
    • Date
    • Thread