General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion macro does nothing on XMetal 6 with Windows 7

  • achu

    macro does nothing on XMetal 6 with Windows 7

    Participants 0
    Replies 1
    Last Activity 9 years, 8 months ago

    Hi,
     I am running the following macro on my windows 7 machine with XMetal author 6.0. but nothing happen. when i run other default macros from the toolbar, nothing happen either.
      when tested on XMetal 5.5 on XP, macro works fine.
      so, what could be wrong?
      thanks in advance!

    'XMetaL Script Language VBSCRIPT:
    dim rng
    dim nd
    dim nd1
    dim style set rng = activedocument.range set nd = selection.containernode if nd.nodename = “bill-ref” or nd.nodename = “resolution-ref” then
    nd.setAttribute “reviewed”, “yes”
    if nd.nodename = “bill-ref” then
    if not selection.MovetoElement(“bill-ref”) then
    selection.MovetoDocumentStart()
    selection.MovetoElement “resolution-ref”
    end if
    else
    if not selection.MovetoElement(“resolution-ref”) then
    selection.MovetoDocumentStart()
    selection.MovetoElement “bill-ref”
    end if
    end if
    activeDocument.RefreshCssStyle
    else
    if not selection.MovetoElement(“bill-ref”) then
    selection.MovetoElement “resolution-ref”
    end if
    activeDocument.RefreshCssStyle
    end if ]]>

    Reply

    Derek Read

    Reply to: macro does nothing on XMetal 6 with Windows 7

    So, no macros run at all (or at least the code they contain is not executed)?

    Not sure I can think of all possibilities but here are 3:

    You may need special permissions to do these things, or you might need to turn UAC off on Windows 7.

    Cause 1
    XMetaL Author might not be properly registered as a COM server. This is normally automatic but it is possible that it failed.
    Please try the following at a CMD prompt:

    1. Shut down XMetaL Author (Enterprise or Essential).
    2. At a CMD prompt use the CD command to navigate to the location of your XMetaL Author installation (the folder containing xmetal70.exe).
    3. Run this command:
    xmetal70.exe /RegServer

    With the correct syntax, and if it succeeds, the application should [u]not[/u] launch and you should get [u]no[/u] feedback. If it fails you should see some kind of error or XMetaL will just launch itself.

    Cause 2
    The VBScript engine in your Windows installation has been disabled or removed. Things that do that usually include virus scanning software. You will need to check with their documentation to see if that might be the case and how to turn it back on.

    Cause 3
    The Windows VBScript engine has been unregistered. This is similar to #2 except that in this case anti-virus may or may not be the cause. Someone or something might have done it on purpose or by accident. There's no really good way to test this except to register the VBscript.dll and see if that fixes the issue:

    1. At a CMD prompt use the CD command to navigate to the system32 subfolder in your main Windows OS folder, usually C:WindowsSystem32.
    2. Confirm that the vbscript.dll exists using
    DIR vbscript*.*
    3. Register the DLL using this command:
    regsvr32.exe vbscript.dll

    If that succeeds then you will see a dialog that tells you that it succeeded. If you see any errors at all then this is an issue to be raised with Microsoft and / or the software that has broken your system.

    If the DLL does not exist then something has messed with your Windows installation to the point where it has been broken. Not sure what would do that. Again, this is either a question for MS or whichever software has messed with your Windows install.

    If #3 briefly fixes the issue but it returns then you can suspect that something is messing with that registration. My first suspicion would be anti-virus settings.

    Note that if you have similar problems with JScript the corresponding file is the jscript.dll in that same Windows folder.

    Reply

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

Lost Your Password?

Products
Downloads
Support