• 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: How to Do This Without Smile or Satimage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to Do This Without Smile or Satimage


  • Subject: Re: How to Do This Without Smile or Satimage
  • From: Rick Gordon <email@hidden>
  • Date: Tue, 28 Feb 2012 03:56:01 -0800

Sorry.

    tell application "Smile"
      set vParaStyleNameOut to uchange "indent" into "flush" in vParaStyleNameIn ¬
        with regexp without case sensitive
    end tell

Smile's uchange command means Unicode change (dating back to when AppleScript strings were not Unicode). The source match substring is "indent" and the change-to string is "flush". So basically, it's parsing the variable vParaStyleNameIn for a match to "indent" and returning the the changed string. In this case the regular expression option is set to true (though not really needed in this example), and case sensitivity is ignored.

A more careful regex would be "^(.+)indent(.*)$" for the source substring and "\1flush\2" for the replace string.

------------------

On 2/28/12 at 10:23 PM +1100, Shane Stanley wrote in a message entitled
"Re: How to Do This Without Smile or Satimage":

>Care to tell us what "uchange...into...in..." actually does?

--
___________________________________________________

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________

WWW:   http://www.shelterpub.com

 _______________________________________________
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: How to Do This Without Smile or Satimage
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: How to Do This Without Smile or Satimage
  • Next by Date: Re: How to Do This Without Smile or Satimage
  • Previous by thread: Re: How to Do This Without Smile or Satimage
  • Next by thread: Re: How to Do This Without Smile or Satimage
  • Index(es):
    • Date
    • Thread