GetPageSource$
Web function.
The GetPageSource$ function returns the source code of the current Web page. Not available in WinTask Lite.
Usage
It gives the same results as the View/Source option in Internet Explorer. To be sure that the page is loaded before invoking the function, check that a UsePage has been done before.
Syntax
var$=GetPageSource$()
Return value
var$, string, long string with all the source code of the HTML Web page. If the source code could not be returned for any reason, the string is empty (an empty string is "").
Remarks
Before invoking this function, you must ensure that the page is fully loaded. You can for example force such a synchronization by using UsePage function.
GetPageSource$ calls directly the Innertext property of Internet Explorer. Due to the way notepad displays this same information, there can be some differences between what you see in notepad using View/Source option and the result of GetPageSource$ function.
See also
Example
On WinTask Web site, we display the source code of the main page:
StartBrowser("IE","www.wintask.com")
UsePage("WinTask - Automation software and Task Scheduler. Macro software with Macro Recorder")
a$=GetPageSource$()
CloseBrowser()
msgbox(a$)