07-03-2016, 04:40 PM
The first code is for Firefox and IE. QM cannot get text from Chrome like from IE and FF, but can get with select-all-and-copy-to-clipboard.
Code for IE
Macro Macro1727
For Chrome
Macro Macro2365
Or can get Chrome page URL and download the page. But it is not very useful because slow, does not work if need to log in etc.
Macro Macro2693
Code for IE
Macro Macro1727
int w=wait(3 WV win("Quick Macros Forum • View topic - Finding Text in web page - Internet Explorer" "IEFrame"))
Acc a.Find(w "PANE" "" "" 0x3001 3)
str s
a.WebPageProp(0 0 0 s)
;out s
if findrx(s "\bHighest Educational\b")>=0
,out 1
else
,out 0For Chrome
Macro Macro2365
int w=wait(3 WV win("Quick Macros Forum • View topic - Finding Text in web page - Google Chrome" "Chrome_WidgetWin_1"))
act w
Acc a.Find(w "DOCUMENT" "" "" 0x3001 3)
a.Select(1)
key Ca
str s.getsel
;out s
if findrx(s "\bHighest Educational\b")>=0
,out 1
else
,out 0Or can get Chrome page URL and download the page. But it is not very useful because slow, does not work if need to log in etc.
Macro Macro2693
int w=wait(3 WV win("Quick Macros Forum • View topic - Finding Text in web page - Google Chrome" "Chrome_WidgetWin_1"))
Acc a.Find(w "DOCUMENT" "" "" 0x3001 3)
str URL
a.WebPageProp(URL)
HtmlDoc d
d.SetOptions(2)
d.InitFromWeb(URL)
str s=d.GetText
;out s
if findrx(s "\bHighest Educational\b")>=0
,out 1
else
,out 0