I had a similar problem, using one file as a reference & wishing to 'mark all' occurences in other open files. Thanks to cyberslug & autoit suggestion, I managed to work out the following ... (not very efficient but works) autoit script: WinWaitActive("TextPad") ; wait for TextPad window $Line ...