• 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 CS3 | afterOpen event listener issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InDesign CS3 | afterOpen event listener issue


  • Subject: Re: InDesign CS3 | afterOpen event listener issue
  • From: demski <email@hidden>
  • Date: Fri, 4 Jul 2008 14:46:29 +0200

Thanks for your answer, Shane!

Do You maybe have an example, where I can see, what I did wrong?
For better understanding here my example, that doesn't work:

script 1: create event listener:
tell application "Adobe InDesign CS3"
make event listener with properties {event type:"afterOpen", handler:"pathname:myScript.applescript", captures:true}
end tell


script 2: the handler, that is stored in "myScript.applescript":


set olddel to AppleScript's text item delimiters set AppleScript's text item delimiters to " | "

main(evt) -- evt event gotten from event listener

set AppleScript's text item delimiters to olddel

on main(invoker)
tell application "Adobe InDesign CS3"
set CD to count documents
set DN to name of active document
set FP to file path of active document
set PG to count pages of active document
set {TF, T, CT, TT} to {id of text frames of active document, text of text frames of active document, count tables of text frames of active document, text of cells of tables of text frames of active document}
display dialog DN & return & "Ort: " & FP & return & "Seiten: " & PG & return & "Rahmen: " & TF & return & "Texte: " & T & return & "Tabellen: " & CT & return & TT
end tell
end main



Am 04.07.2008 um 14:37 schrieb Shane Stanley:

On 4/7/08 10:04 PM, "demski" <email@hidden> wrote:

The problem is, that the handler script runs before the document is
shown. Therefor I get error messages as soon as I concern to anything
residing in the Layout.
Is there any known way to wait for the document window to show and
after that let the script do its work?

I've only used it briefly, but I've found the scripts work fine even though
the document window is not visible until the script is finished.


--
Shane Stanley <email@hidden>


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden


mit besten Grüssen Kind regards

demski


die Anderen · digitale mediendienstleistungen Bellealliancestrasse 58 b 20259 Hamburg

fon +49 (0) 40 41 26 61 81
mob +49 (0) 172 40 70 319

Hinterhof der Firma Hertz & Selck



_______________________________________________
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: InDesign CS3 | afterOpen event listener issue
      • From: Shane Stanley <email@hidden>
References: 
 >Re: InDesign CS3 | afterOpen event listener issue (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: InDesign CS3 | afterOpen event listener issue
  • Next by Date: Re: InDesign CS3 | afterOpen event listener issue
  • Previous by thread: Re: InDesign CS3 | afterOpen event listener issue
  • Next by thread: Re: InDesign CS3 | afterOpen event listener issue
  • Index(es):
    • Date
    • Thread