2 Replies Latest reply on Aug 11, 2008 9:13 AM by jhuddle123

    [AS] CS3 Find -Change inserting soft return instead of hard

    jhuddle123 Level 1
      Can anyone help identify why this script doesn't work? i want it to replace multiple returns with a single paragraph return. It's replacing with a soft return rather than a hard return.
      I copied and pasted the find grep and change grep fields into the script. I even tried it by typing "\r" into the change grep field. Any thoughts? Much appreciated!

      tell application "Adobe InDesign CS3"

      --Clear the find/change preferences.
      set find grep preferences to nothing
      set change grep preferences to nothing
      set find text preferences to nothing
      set change text preferences to nothing

      --Set the find options.
      set include footnotes of find change grep options to false
      set include hidden layers of find change grep options to false
      set include locked layers for find of find change grep options to false
      set include locked stories for find of find change grep options to false
      set include master pages of find change grep options to false



      --delete multiple graphs

      set find what of find grep preferences to "~b~b+"
      set change to of change grep preferences to "
      "
      set myStory to parent story of item 1 of selection
      tell myStory
      set myFoundItems1 to change grep
      end tell

      set find grep preferences to nothing
      set change grep preferences to nothing


      end tell