2 Replies Latest reply on Sep 15, 2008 6:43 PM by (Vera_Kapinos)

    AS Tiger to Leopard

    Level 1
      This thread is a result of my previous two. I try to transfer CS2-Tiger scripts to CS3-Leopard. I discovered that if I stay in Tiger just replacing "CS2" to "CS3" in "tell" line - script works for me. But when I open the same script in Leopard - it looks like some "programming" language.
      Here is the sample script:

      tell application "Finder"
      set theDocument to choose file
      set theSource to choose file

      tell application "Adobe InDesign CS3"
      with timeout of 1500 seconds
      try
      set properties of PDF place preferences to
      {PDF crop:crop content, page number:1}
      activate
      set MyDoc to open theDocument without showing window
      tell MyDoc
      tell page 1
      place theSource on rectangle 1
      tell rectangle 1 to fit given content to frame
      end tell
      end tell
      save MyDoc to theDocument
      on error errStr number theNumber
      display dialog "Error in handler PlacePDF " & theNumber & return & errStr
      end try
      end timeout
      end tell
      end tell

      And now how it appeared when I opened it on Leopard machine:

      tell application "Finder"
      set theDocument to choose file
      set theSource to choose file

      tell application "Adobe InDesign CS3"
      with timeout of 1500 seconds
      try
      set «class qpro» of «class DFif» to ¬
      {«class DFcr»:«constant nFcpCrpC», «class Pgnb»:1}
      activate
      set myDoc to open theDocument without «class psiw»
      tell myDoc
      tell «class page» 1
      «event InESplac» theSource given «class insh»:«class crec» 1
      tell «class crec» 1 to «event InESfitc» given «class givn»:«constant fitoctof»
      end tell
      end tell
      «event CoResave» myDoc given «class kfil»:theDocument
      on error errStr number theNumber
      display dialog "Error in handler PlacePDF " & theNumber & return & errStr
      end try
      end timeout
      end tell
      end tell

      You see - all those "classes" - what's that?
      This script compiles (if I try to write it in normal "English" AppleScript - it doesn't compile) but doesn't work. If I take it to Tiger - it doesn't compile.

      Could anybody help?

      Thank you in advance for any possible help/ideas
      Vera