I tried to write a script so that I can drop all my pages and it will process all pages + find and change some corrections, but there seems to be a problem with saving file, anyone knows how o resave file???
on open sourceFolders
repeat with sourceFolder in sourceFolders
tell application “Finder”
try
– If you would like to include subfolders, you say - every file of entire contents of folder…
set idFiles to (every file of folder sourceFolder whose file type is “IDd3”) as alias list
on error – work around bug if there is only one file
set idFiles to (every file of folder sourceFolder whose file type is “IDd3”) as alias as list
end try
end tell
if idFiles is not {} then
tell application "InDesign CS"
repeat with i from 1 to count of idFiles
open item i of idFiles
tell document 1
activate
set find preferences to nothing
set change preferences to nothing
set myDocument to document 1
try
--find out if text is selected so that we can adjust the dialog to search Document or Story
set theClass to class of item 1 of selection
if theClass is in {text, text frame, insertion point} then
set searchOptions to {"Document", "Story"}
end if
on error
set searchOptions to {"Document"}
end try
repeat
try
set myfoundspaces to search document for "NC" replacing with "9N"
if myfoundspaces = {} then
exit repeat
end if
on error
exit repeat
end try
end repeat
end tell
close with saving
end repeat
set user interaction level to interact with all
end tell
end if
return 10 -- try again in 10 seconds
end repeat
end open