XMetaL Tips and Tricks
XMetaL Community Forum › XMetaL Tips and Tricks › Script Example: Loading web pages in Resource Manager
murray February 26, 2010 at 12:31 am
Script Example: Loading web pages in Resource ManagerFebruary 26, 2010 at 12:31 amParticipants 1Replies 0Last Activity 13 years ago
Some web pages can take a little while to load in the Resource Manager and script running in XMetaL Author cannot do any operations on the web page until it is fully loaded. Therefore we need some way to know when a web page running in the resource manager is fully loaded.
A web page is loaded in the resource manager. When the page finishes loading (theonload event executes), it invokes a macro in XMetaL Author to tell XMetaL the page is fully loaded.
1) copy the resManTest2.mcr file to the Startup folder in XMetaL Author
2) copy the resManTest2.html file to the Forms folder in XMetaL Author
If running a version of XMetaL Author that is different than 6.0, you will need to edit the resManTest2.mcr file and change the path to the resManTest2.html file that is in the WebPage.navigate() call.
On startup, the resManTest.mcr file is loaded. It has a macro called “LoadWebPageInResourceManager” that you can launch. The page is loaded in the resource manager. When the page finishes loading, it invokes a macro in XMetaL Author to tell XMetaL the page is fully loaded (which pops up an alert message in this case).
To launch the macro:
– Right click on the tool bar are in XMetaL Author and enable the Macro toolbar.
– Select the LoadWebPageInResourceManager macro from the pulldown list.
– Launch the macro by clicking on the Run Current Macro button (the green triangle to the left of the pulldown list).
- You must be logged in to reply to this topic.