0 Replies Latest reply on Aug 3, 2009 4:04 AM by J van E

    Could anyone help me to get this script working?

    J van E Level 1

      I've got this CS2 script that worked in CS3 after putting in the Version 4.0 Scripts folder (never mind the Dutch dialog). But this trick doesn't do it in CS4. I wonder if anyone could rewrite it for CS4...? I know absolutely nothing about scripts, so er... I don't need directions on how to solve this problem: I just need a working script. Thanks in advance!

       

      tell application "Adobe InDesign CS3"

      set «class pFnd» to nothing

      set «class pChg» to nothing

      set mySel to selection

      if (length of mySel) = 0 then

      display dialog "Fout! Selecteer één (of meerdere) tekstkader(s)" & return & ¬

      "met één van de twee pijltjes!"

      else if class of item 1 of mySel is not text frame then

      display dialog "Fout! Selecteer één (of meerdere) tekstkader(s)" & return & ¬

      "met één van de twee pijltjes!"

      else

      try

      if class of item 1 of mySel is text then

      set mySearch to «class pTxF» of selection

      else if class of item 1 of mySel is text frame then

      set mySearch to mySel

      end if

      «event K2  Find» mySearch given «class for »:",,", «class FRpT»:"<0022>"

      «event K2  Find» mySearch given «class for »:"‘‘", «class FRpT»:"<0022>"

      «event K2  Find» mySearch given «class for »:"’’", «class FRpT»:"<0022>"

      «event K2  Find» mySearch given «class for »:"“", «class FRpT»:"<0022>"

      «event K2  Find» mySearch given «class for »:"”", «class FRpT»:"<0022>"

      «event K2  Find» mySearch given «class for »:"„", «class FRpT»:"<0022>"

      «event K2  Find» mySearch given «class for »:"‘", «class FRpT»:"<0027>"

      «event K2  Find» mySearch given «class for »:"’", «class FRpT»:"<0027>"

      «event K2  Find» mySearch given «class for »:"´", «class FRpT»:"<0027>"

      «event K2  Find» mySearch given «class for »:"<0020><0020>", «class FRpT»:"<0020>"

      «event K2  Find» mySearch given «class for »:"^t^t", «class FRpT»:"^t"

      «event K2  Find» mySearch given «class for »:"^p^p^p", «class FRpT»:"^p^p"

      «event K2  Find» mySearch given «class for »:"^p<0020>", «class FRpT»:"^p"

      on error

      display dialog "Fout! Selecteer één (of meerdere) tekstkader(s)" & return & ¬

      "met één van de twee pijltjes!"

      end try

      end if

      end tell