Purpose |
To provide an interface to Internet Explorer. |
||||||||||||||||||||
Syntax |
winio@('%N.Mwb[resource_or_url]') |
||||||||||||||||||||
Description |
Provides direct access to the Microsoft Internet Explorer engine. This means that, unlike %ht (Hypertext), %wb can use any form of script provided only that it could be viewed in Internet Explorer. As with %ht (Hypertext), the basic form for %wb is: winio@('%N.Mwb[resource_or_url]') N and M provide the dimensions in the same way as for %ht. Within the square brackets you can provide a URL, for example [http://forums.silverfrost.com/index.php] or [file://C:\MyDir\Myfile.html] or [file://C:\MyDir\Myfile.html#MySection]. For access to a document (MyDoc.htm) within a .chm file (MyChm.chm), the URL would take the form: [its:C:\\MyDir\\MyChm.chm::MyDoc.htm] Alternatively you can provide the name of an HTML resource within the square brackets, for example [myhtml] together with a resource script containing a line of the form: myhtml HYPERTEXT "C:\MyDir\Myfile.html" For third-party compilers use HTML in place of HYPERTEXT. There are a list of standard callbacks associated with %wb
The function wbCommand@ that can be used to navigate to a given URL or to directly call one of the above %wb standard callbacks.
%wb can take a callback function that is called before every URL navigation. The CLEARWIN_STRING@ "CALLBACK_REASON" is "HYPERTEXT_LINK" at which point the CLEARWIN_STRING@ "CURRENT_URL" provides the URL. The callback should return the value 2 in order to complete the navigation. Alternatively the value 3 will cancel the navigation and can be used to perform some other task in response to the hyperlink. Unlike %ht, a given window can contain more than one %wb control. %wb is much more versatile than %ht. When compared with %ht, its only limitation is that images can not be embedded within a resource script and must be provided either as external files or as direct data. See for example http://www.websiteoptimization.com/speed/tweak/inline-images/ which provides a markup of the form... <img src="data:image/gif;base64, ...raw data inserted here..." width="16" height="14" alt="embedded folder icon"> Depending on the operating system, the internal dialog for "wbHistory" may look better when you include a standard manifest file in your resource script... 1 24 default.manifest |
Example |
program WebPage |
See also |