• 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: INDESIGN CS2: Altering a Text Selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: INDESIGN CS2: Altering a Text Selection


  • Subject: Re: INDESIGN CS2: Altering a Text Selection
  • From: Rick Gordon <email@hidden>
  • Date: Thu, 10 Aug 2006 20:07:22 -0700

Running Kai's script ...

tell application "Adobe InDesign CS2"
	tell document 1
		set selection to text from character 1 of selection to character -2 of selection
	end tell
end tell

... generates the following error:

"Adobe InDesign CS2 got an error: Invalid value for set property 'selection'. Expected object, list of objects or nothing, but received nothing."

And this is with a valid text selection active and highlighted, with the text tool chosen.

I would certainly expect this to work, coming from more Quark than InDesign scripting experience.

This snippet, based on Malcolm's suggestion, deletes the last return, as did his unmodified version. I'm still stumped.

...
set text of selection to (characters 1 thru -2 of (text of selection) as text) as text
...

Rick Gordon

--

___________________________________________________

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: INDESIGN CS2: Altering a Text Selection
      • From: Shane Stanley <email@hidden>
References: 
 >INDESIGN CS2: Altering a Text Selection (From: Rick Gordon <email@hidden>)
 >Re: INDESIGN CS2: Altering a Text Selection (From: kai <email@hidden>)

  • Prev by Date: Re: INDESIGN CS2: Altering a Text Selection
  • Next by Date: Re: INDESIGN CS2: Altering a Text Selection
  • Previous by thread: Re: INDESIGN CS2: Altering a Text Selection
  • Next by thread: Re: INDESIGN CS2: Altering a Text Selection
  • Index(es):
    • Date
    • Thread