I have this script, which asks for a search string and a replace string, then uses UltraEdit.frInFiles to search and replace in all open files:
but this is what I get in the output window, even though I can see the open files contain the string I'm searching for:
Do I need to set more parameters before I call the replace function?
Thanks.
Code: Select all
var strSearch = UltraEdit.getString("Search for?",1);
var strReplace = UltraEdit.getString("Replace with?",1);
UltraEdit.outputWindow.showWindow(true);
UltraEdit.outputWindow.write("Searching for \"" + strSearch + "\"");
UltraEdit.outputWindow.write("Replacing with \"" + strReplace + "\"");
UltraEdit.frInFiles.filesToSearch = 1;
UltraEdit.frInFiles.matchCase = false;
UltraEdit.frInFiles.matchWord = false;
UltraEdit.frInFiles.regExp = false;
UltraEdit.frInFiles.useOutputWindow = true;
UltraEdit.frInFiles.searchInFilesTypes = "*.ini";
UltraEdit.frInFiles.unicodeSearch = false;
UltraEdit.frInFiles.replace(strSearch, strReplace);
but this is what I get in the output window, even though I can see the open files contain the string I'm searching for:
Code: Select all
Searching for "bin"
Replacing with "xxx"
0 items replaced in 0 files.
Script succeeded.
Thanks.