-2

I am looking for a piece of applescript where the user is asked to select a specific frame in InDesign and then copy its contents into another document. I use this to create a new structured document within a script.

I have made a script where i ask the user to select a frame with

    display dialog "Selecteer kop" buttons {"OK", "Nee", "Cancel"} default button "OK"
        if button returned of result is "OK" then
            if class of item 1 of selection is in {rectangle, oval, polygon} then

Problem is when i run this part i can't select in InDesign a frame and then go on with my script.

zwaardje
  • 1
  • 1
  • 1
    Please [take the tour](https://stackoverflow.com/tour) and take the time to [read this](https://stackoverflow.com/help/how-to-ask) then come back and [edit your question](https://stackoverflow.com/posts/56755500/edit) to let us know what you,ve tried so far and how it fails to meet expectations – cybernetic.nomad Jun 25 '19 at 19:21

1 Answers1

1

In the chain of actions, don't ask user to select a page item after having displayed the dialog but have the user select the page item and then check the context prior to display the dialog.

Loic
  • 2,173
  • 10
  • 13