Pages: « 1 2 3 4 5 6 7 8 9 10 »
 41 
 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?

 42 
 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?

 43 
 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.

 44 
 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.


 45 
 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.

 46 
 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)) {

 47 
 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
rng.MoveToDocumentStart();
//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...
   }
}

 48 
 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.

Thanks,
Jeff

 49 
 on: July 21, 2017, 01:06:10 PM 
Started by pszwec - Last post by Derek Read
I think it's worth it to test with the 64-bit version to see if the 32-bit XMetaL Author is the issue for sure. If the only solution is to run the 64-bit release then an upgrade would be necessary.

If you plan to run this on Windows 8.1 or 10 then an upgrade would be necessary as well. XMetaL Author 11 was the first to support Windows 8.1 and 10.

 50 
 on: July 21, 2017, 10:48:46 AM 
Started by pszwec - Last post by pszwec
Any way around this you can't think of without upgrading?

Peter

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