Pages: 1
Print
Author Topic: ResourceManager - google.com navigation - broken?  (Read 534 times)
lchiriac
Member

Posts: 2


« on: April 17, 2018, 04:36:16 PM »

I have been trying to use the ResourceManager to add a tab and navigate to http://www.google.com, as explained in tutorials, but I am getting errors, see attached the screenshot.

Using XMetaL Author Enterprise 10.0 or 12.0

Is it because of the .js files referenced, or am I doing something wrong?

<?xml version="1.0"?>
<!DOCTYPE MACROS SYSTEM "macros.dtd">
<MACROS>
   <MACRO name="On_Application_Open_Complete" lang="JScript" hide="false"><![CDATA[
        // XMetaL Script Language JSCRIPT:
                ResourceManager.Visible = true;
                ResourceManager.RemoveTab( "Assets" );
                ResourceManager.RemoveTab( "Desktop" );
                ResourceManager.RemoveAllTabs();
                ResourceManager.AddTab("MyTab", "Shell.Explorer.2");}
                var msie= ResourceManager.ControlInTab("MyTab");
                msie.Navigate("http://google.com/");
      
   ]]></MACRO>
</MACROS>

Screenshot attached with the error box. Any thoughts appreciated.

 -Liviu


* script_error_google_dot_com.png (23.5 KB, 450x286 - viewed 96 times.)
« Last Edit: April 17, 2018, 05:25:55 PM by lchiriac » Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2579



WWW
« Reply #1 on: April 17, 2018, 06:38:06 PM »

I can't reproduce your exact issue but there is definitely a syntax error on line 6 (marked in red below):

ResourceManager.AddTab("MyTab", "Shell.Explorer.2");}

Removing the curly bracket at the end fixes that and allows the script to run properly.
Logged
lchiriac
Member

Posts: 2


« Reply #2 on: April 17, 2018, 09:58:11 PM »

Hi Derek, truly sorry about that - I had a try/catch there... which I removed and I left the typo in.

Below is what I have, it does not have any syntax errors. It gives me the same error as the screenshot I attached earlier.

<?xml version="1.0"?>
<!DOCTYPE MACROS SYSTEM "macros.dtd">
<MACROS>
<MACRO name="On_Application_Open_Complete" hide="true" lang="JScript">
<![CDATA[
   ResourceManager.Visible = true;
   ResourceManager.RemoveTab( "Assets" );
   ResourceManager.RemoveTab( "Desktop" );
   ResourceManager.RemoveAllTabs();
   ResourceManager.AddTab("Demo","Shell.Explorer");
   ResourceManager.SelectTab("Demo");
   msie = ResourceManager.ControlInTab( "Demo" );
   msie.navigate( "http://www.google.com" );
]]>
</MACRO> 


</MACROS>

I have IE version is 11.0.9600.18952. Could that be the issue maybe... is there a way to see what version of the IE is trying to invoke when using Shell.Explorer or Shell.Explorer.2 ?

Thanks a lot for your help!
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2579



WWW
« Reply #3 on: April 18, 2018, 03:23:14 PM »

Here are some things to try:

1. Navigate to another website instead to see if the issue is limited to something Google is doing. Your screenshot suggests Google is serving up some code that is giving you issues.
2. Navigate to an HTML page you have stored on disk that you've created yourself. C:\temp\mytest.html or something, then put nothing into that HTML file except very basic HTML and no scripts and see if that renders.
3. Load google.com directly into IE (and specifically not Edge which is an entirely different engine and not embedded when you use Shell.Explorer).

I'm fairly certain you would see the same IE version reported for embedded copies. If you want to try to check that you would probably need to create an HTML page that contains script that displays the value for window.navigator.userAgent, then load the page into the Resource Manager (as #2 above).

It sounds like you are dealing with this with Tom through email. I think we should try to limit the communicate for this to that one pathway.
Logged
Pages: 1
Print
Jump to: