General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion ResourceManager – google.com navigation – broken?

  • lchiriac

    ResourceManager – google.com navigation – broken?

    Participants 2
    Replies 3
    Last Activity 4 years, 5 months ago

    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?




           // 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/”); ]]>

    Screenshot attached with the error box. Any thoughts appreciated.

    -Liviu

    Reply

    Derek Read

    Reply to: ResourceManager – google.com navigation – broken?

    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.

    Reply

    lchiriac

    Reply to: ResourceManager – google.com navigation – broken?

    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.





    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” );
    ]]>
     

    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!

    Reply

    Derek Read

    Reply to: ResourceManager – google.com navigation – broken?

    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:tempmytest.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.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support