• 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: Get Current cursor position in InDesign CS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get Current cursor position in InDesign CS


  • Subject: Re: Get Current cursor position in InDesign CS
  • From: Robert Kiolbassa <email@hidden>
  • Date: Wed, 26 Oct 2005 09:10:02 -0500
  • Thread-topic: Get Current cursor position in InDesign CS

Thanks Shane and Olivier, for the code and the input. I was able to drop
Shane's code into my script and it worked like a charm.

Only one question remains: I have been testing this in CS, and the code
notes that the way to refer to the bounds of the text frame are different in
CS and CS2. Both ways seem to work in my InDesign CS, but I haven't had the
chance yet to see if only the CS2 way works in CS2.

Thanks again for your help. I work on a lot of forms and this is a
lifesaver. I've included the completed script below.

-- begin script
tell application "InDesign CS"
-- -------------------------------------- begin Shane's code
    set thePos to horizontal offset of selection
    set {a, b, c, d} to geometric bounds of item 1 of parent text frame of
selection -- in CS2
    --set {a, b, c, d} to geometric bounds of parent text frame of selection
-- in CS
    set myLoc to thePos - b
-- -------------------------------------- end Shane's code

    tell front document
            tell paragraph 1 of selection
                set properties to {rule below:true, rule below left
indent:myLoc, rule below line weight:0.5, rule below width:text}
            end tell
    end tell
end tell
-- end script

Bob

 _______________________________________________
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 : Get Current cursor position in InDesign CS
      • From: Olivier Ringenbach <email@hidden>
References: 
 >Get Current cursor position in InDesign CS (From: Robert Kiolbassa <email@hidden>)

  • Prev by Date: Re: Producing Unicode-only characters [was: Finding \t, \r, \n reliably]
  • Next by Date: Simple Backup Script
  • Previous by thread: Re: Get Current cursor position in InDesign CS
  • Next by thread: Re : Get Current cursor position in InDesign CS
  • Index(es):
    • Date
    • Thread