Your script is working fine for me in CS3. I don't think so, CS3 and CS4 has much difference in 'find/Change' scripting. If the document has hyphen (-) before the line break, it showing that occurrences. Try like this, place that findGrepPreferences and changeGrepPreferences Nothing after that for loop.
Dear Vaasu Devi,
Many thanks for your reply...
I found, where I mistaken....
Here My Correct Code :
//================= Coding ==================//
var myDoc= app.activeDocument;
app.findChangeGrepOptions.includeFootnotes = false;
app.findChangeGrepOptions.includeHiddenLayers = false;
app.findChangeGrepOptions.includeLockedLayersForFind = false;
app.findChangeGrepOptions.includeLockedStoriesForFind = false;
app.findChangeGrepOptions.includeMasterPages = false;
app.findGrepPreferences.findWhat = "([a-zA-Z]*)-\\n([a-zA-Z]*)";
mySearch = app.findGrep();
for(var myForce =0; myForce<mySearch.length; myForce++)
myConts = mySearch[myForce].contents;
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
//=============== End of the Coding ========================//
app.select() is working fine, meanwhile, I get the selection of the contents. That time only its throw the Error message. So I used to divert, app.select and Select Value of Contents to pass the "myConts" variable then I will do the other funtions.... Now My this time I'm not getting the Errors...
Thanks Once again