for stackoverflow question http://stackoverflow.com/questions/13959744/why-script-will-sometimes-launch-extendscript-toolkit-just-stall/13973259#comment19288901_13973259 based on this http://pastebin.com/sNyNSB1h
// for stackoverflow
// http://stackoverflow.com/questions/13959744/why-script-will-sometimes-launch-extendscript-toolkit-just-stall/13973259#comment19288901_13973259
//
main();
function main(){
if ( app.documents.length > 0 && app.activeDocument.textFrames.length > 0 ) {
var searchTerms = new Array();
searchTerms.push({findWhat:"*",changeTo:"!"});
searchTerms.push({findWhat:"!",changeTo:"%"});
for(var k = 0; k < searchTerms.length;k++){
var searchChar = searchTerms[k].findWhat;
var changeChar = searchTerms[k].changeTo;
for ( i = 0; i < app.activeDocument.textFrames.length; i++ ) {
var textArt = activeDocument.textFrames[i];
for ( j = 0; j < textArt.characters.length; j++) {
var myCharacter = textArt.characters[j];
if(myCharacter.contents == searchChar){
myCharacter.verticalScale = 120;
myCharacter.horizontalScale = 140;
myCharacter.baselineShift = -3;
myCharacter.contents = changeChar;
}
}
}
app.redraw();
}
}
}