Есть вот такая копка
RefreshObject "WebBrowser4"
BrowserExecScript "WebBrowser4" "//get the search string variable from NeoBook...|//str = window.external.nbGetVar( [#34]SearchStr[#34] );|str = '[SearchStr]';|if (str!=[#34][#34]) {|| found = false;| txt = window.document.body.createTextRange();| | //search document for all occurrences of str...| while (txt.findText(str)!=false) {| | //highlight found text...| txt.pasteHTML( [#34]<font style='background:highlight' color='highlighttext'>[#34]+ txt.htmlText + [#34]</font>[#34]);|| if (found!=true) {| found = true;| //Scroll first found occurrence into view...| txt.scrollIntoView();| }| //move on to the next occurrence...| txt.moveStart([#34]character[#34], 1);| txt.collapse(false);| }|| if (found!=true) {| //display an error if nothing was found...| alert([#34]The string '[#34]+str+[#34]' Не найдено.[#34]);| }|}" "JavaScript" --------------------
взял из стандартных примеров необука, проблема в том, что текст ищет только первый, то есть если в поиске есть 2 таких слова, то второй он уже не находит, постоянно возвращается к первому, в чем беда. не подскажите?