• 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: Requesting help with 'range' conversion, please
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Requesting help with 'range' conversion, please


  • Subject: Re: Requesting help with 'range' conversion, please
  • From: Shane Stanley <email@hidden>
  • Date: Tue, 02 Dec 2014 09:22:57 +1100

On 2 Dec 2014, at 9:11 am, Brian Christmas <email@hidden> wrote:
>
> range:{(eachAttributedCharacterCounter - 1) as integer, 1 as integer}

You can usually pass a list for range, and you shouldn't need those coercions, so it may well be the values that are causing the problem. But...

A range should really be entered as a record:

range:({location:(eachAttributedCharacterCounter - 1), |length|:1})

Or using the NSMakeRange function:

range:(current application's NSMakeRange((eachAttributedCharacterCounter - 1), 1))

--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Requesting help with 'range' conversion, please
      • From: Brian Christmas <email@hidden>
References: 
 >Requesting help with 'range' conversion, please (From: Brian Christmas <email@hidden>)

  • Prev by Date: Requesting help with 'range' conversion, please
  • Next by Date: Re: Requesting help with 'range' conversion, please
  • Previous by thread: Requesting help with 'range' conversion, please
  • Next by thread: Re: Requesting help with 'range' conversion, please
  • Index(es):
    • Date
    • Thread