Pages: « 1 2 3 4 5 6 7 8 9 10 »
 on: August 09, 2017, 11:26:48 AM 
Started by akheiljain - Last post by akheiljain
Not having any luck with running the demo 5 and demo 6 from the XMetal website demo of "Extending XMetaL Author Using the Resource Manager" Has anyone been able to run through the demo successfully? Does anyone know how to get access to CritiqueUtils.dll and/or the source code?

Akheil Jain

 on: August 07, 2017, 02:00:14 AM 
Started by Shekii - Last post by Shekii


 on: August 03, 2017, 01:11:15 PM 
Started by tharpa - Last post by Derek Read
If you have the ability to debug the customization that would be the best option.

I'm not sure what opening a record means exactly, or what a record would be (if it is not simply opening an XML file stored on your drive), but it sounds like maybe the customization would be overriding the basic File > Open functionality on the File menu?

If that's the case then look in the macros in the customization for the event macro named "File_Open". If you find one of those that would be the best place to start debugging from. This would be an application-level macro, so it would probably be in the Startup subfolder in the installation.

Have a look at the Programmers Guide topic "File operations" for more information on the File_Open event macro and other related ones (File_New, File_Save, File_Close, etc).

If opening a record is done some other way from selecting File > Open then you could be looking for a macro with any name. In this case the macro file (MCR) would still likely be in the Startup folder but the macro that does the "open record" might be called anything. In this case I'd search for "open" or similar words in that MCR file.

Hopefully whoever built this documented something, or at least put comments into their code?

 on: August 03, 2017, 07:35:18 AM 
Started by tharpa - Last post by tharpa
I am supporting, as best I can, a legacy application which is supposed to open its records in XMetaL Author Essential 9.0.  I had not used this feature in a couple of months, however, now it does not do this, i.e. XMetaL does not open, or if it is already open, it does not open the record.  For other users it is still working properly.  I tried uninstalling and reinstalling both XMetaL and the other application.

Any thoughts on where I should look?

 on: August 01, 2017, 05:24:20 PM 
Started by jshick - Last post by Derek Read
It sounds like your XFT form is VBScript. To use my example unmodified you'd need to use it in a JScript XFT form. The scripting language is declared when you first create the form in the XFT editor (you can choose from any of the script engines installed on your machine).

XFT forms (unlike MCR files) can only include one scripting language.

If you are comfortable with JScript then you may wish to recreate your form, selecting JScript as the language. If you prefer VBScript then the code would need to be adjusted from JScript to VBScript.

 on: July 27, 2017, 01:51:08 PM 
Started by jshick - Last post by jshick
I copied into Notepad first to make sure it wasn't picking up any special characters from the HTML, then I copied from Notepad into the XMetal Form Layout Tool.

The first error I get is "Expected statement" on the first line. It apparently doesn't like // being used to denote comments. I can use a ' at the beginning of each comment line and it seems to get along with that just fine.

The second error I get is "Expected end of statement" on the line 3, the variable definition. It seems like it doesn't like a ; at the end of each line, so I removed those.

The third error which I can't get passed is the "invalid character" on the "while" line.

 on: July 26, 2017, 04:47:55 PM 
Started by jshick - Last post by Derek Read
Not sure where that would be coming from. Does it not say which character is invalid?

Try pasting into a different editor?
Stepping through with a debugger might give more information.

 on: July 26, 2017, 02:44:10 PM 
Started by jshick - Last post by jshick
I'm getting the following error:

Invalid character
Source line: while(rng.MoveToElement(elemName)) {

 on: July 26, 2017, 01:55:47 PM 
Started by jshick - Last post by Derek Read
There's almost always a way. Just need to define the problem in enough detail to understand what needs to be done.

Maybe something like this is what you need.

//XMetaL Script Language JScript:
//name of element you are looking for
var elemName = "ref-callout";
//create a range to walk through the document
var rng = ActiveDocument.Range;
//move the range to the start of the document
//for every element that matches the right element name...
while(rng.MoveToElement(elemName)) {
   //...if that element has an @href with the value r101
   if(rng.ContainerAttribute("href") == "r101") {
      Application.Alert("found one...");
      //do whatever you need to do to this element here...

 on: July 26, 2017, 10:55:20 AM 
Started by jshick - Last post by jshick
Alright, after some time away from this, I'm back. Perhaps there is no way for me to do what I'm looking for in a macro since it doesn't seem like I can even do it using the dialog box.

If I bring up the "Find & Replace" dialog box (ctrl+F), there are 3 tabs at the top: Text, Element, Entity. "Text" will find PCDATA within an element. I'm actually trying to find the value (r101) of an attribute (href) in a specific element (ref-callout) when in Normal or TagsOn Views. The ref-callout element doesn't actually contain any PCDATA, only attributes.

I can switch to plain text and just search for "r101" (but it doesn't seem like I am able to restrict by element in PlainTextView) and it will cycle through all of the occurrences of "r101". This is not ideal as I do not want the content authors to switch into PlainTextView.


Pages: « 1 2 3 4 5 6 7 8 9 10 »
email us