Pages: « 1 2 3 4 5 6 7 8 9 10 »
 41 
 on: April 25, 2019, 03:52:45 PM 
Started by queshaw - Last post by queshaw
The topic "Associate a form with a customization object" is what I'm referring to. I don't see anywhere a description of how to create a customization object. If a CTM file is a customization object, visual studio tells me I can't add a CTM file to an XMetaL application solution.

The samples seem to be tied to a DTD, I am not doing anything related to a DTD and don't want to bind a form to an element in the XML document being edited. I am so far not getting how a form is associated with program logic by looking at the samples.

The documentation for Application.CreateFormDlg shows DoModal() being called on the object returned. Aside from not wanting a modal dialog box, what object is returned? How do I access the value of forms set in the dialog box after it's been dismissed?


 42 
 on: April 25, 2019, 02:49:40 PM 
Started by queshaw - Last post by Derek Read
Have a look at the topic "Associate a form with a customization object".

That discusses how to add added to the CTM file that tell XMetaL Author which form to associate with which element, whether it is embedded or to be launched as a modal dialog and various other settings.

You can also launch a form using an API but the most common method (if you need to associate the form with an element) is to make the associations with the CTM file. The topic "Executing a form as a modal dialog in XMetaL" discusses that and provides the simplest example of launching an XFT as a modal form from script.

The topic "Sample forms" lists the forms provided with the Journalist with brief descriptions (fully understanding what each does is best done by using the Journalist sample and examining it's MCR, CTM and XFT files). Hard to say which one would be nearest to what you want to do.

 43 
 on: April 25, 2019, 02:16:13 PM 
Started by queshaw - Last post by queshaw
The documentation for xmetal developer 12 says you can associated a form with a "customization object". But, I see nowhere where it says what a customization object is, or how to create one. Can you elaborate?

Ultimately, I want to present a dialog box to the user and get data from fields in the form to use from a macro, which I take it is the one form that scripts take. I don't see how binding the form to XML could work for me.

 44 
 on: April 17, 2019, 02:17:20 PM 
Started by mag3737 - Last post by mag3737
XMetaL script extension: Global Track Changes
Filename: xmetaLExtension-globalTrackChanges.mcr
Author: Tom Magliery
Version: 1.0
Date: 17 April 2019

This script extension adds a "global track changes" setting to XMetaL Author.

Ordinarily XMetaL provides change tracking (aka revision marking) only on a per-document
and per-session basis. Change tracking is OFF by default, and when turned ON (via the
Tools > Track Changes command) is applicable only to the active document, and only until
XMetaL is closed.

This script adds the following behaviour:
1. Change tracking can be set to default to ON for all documents
2. The user can change the default to his/her own preference
3. The setting remains in effect the next time XMetaL is opened

Installation instructions:
==========================
1. Close XMetaL.
2. Copy this file into the XMetaL "Startup" folder.
3. Restart XMetaL.

Removal instructions:
=====================
1. Close XMetaL.
2. Remove this file from the XMetaL "Startup" folder.
3. Delete the per-user copy of the "xmetal.ini" settings file. This file is kept in the
following directory:
%APPDATA%\Softquad\XMetaL\[versionnumber]
WARNING: Do not confuse this with the "master" copy of the xmetal.ini file, which is
kept in the Program Files/XMetaL directory!
4. Restart XMetaL.

Usage instructions:
===================
This extension includes user-executable macros for changing the Global Track Changes
setting to ON or OFF. At present the only ways to execute these user macros are via
the Macros toolbar and the Tools > Macros dialog. Look there for the macros called
"Turn Global Track Changes ON" and "Turn Global Track Changes OFF".

Note: The built-in menu command (Tools > Track Changes) retains its existing
functionality, which is to toggle the Track-Changes status of the current active
document. For example, if the Global Track Changes setting is currently ON, then after
a document is opened, the menu command could be used to turn change tracking OFF for
only that document.

Compatibility:
==============
This script was tested with XMetaL Author Enterprise 14. However, the (very few) APIs
that this uses have been available in XMetaL since approximately the time of the Roman
Empire. It should work fine with both XMetaL Author Essential and Enterprise going back
at least several versions.

 45 
 on: April 16, 2019, 09:38:53 AM 
Started by queshaw - Last post by queshaw
Thank you!

Ultimately, I want to set an attribute on rows within the selection.

Kendall

 46 
 on: April 15, 2019, 12:58:55 PM 
Started by queshaw - Last post by Derek Read
See my reply here, third in the thread:

http://forums.xmetal.com/index.php/topic,4037.0.html

The two relevant APIs are:
Selection.IsMultiCellSelection
Selection.Cells

If you can provide more information about what you need to accomplish I might be able to suggest something in more detail. Keep in mind that the actual end result (and starting condition) is the most important thing here as sometimes you can get there multiple ways.

 47 
 on: April 11, 2019, 03:17:49 PM 
Started by queshaw - Last post by queshaw
I need to write a macro/script/program that alters the XML that the user has selected. In this case, the selection is expected to contain OASIS table rows. How can I find what is "selected", i.e. elements that are highlighted after the user dragged a selection with the mouse?

I read 2 posts roughly asking the same question. One answer uses IsInsertionPoint and suggests moving ranges around, but I have no idea how that would tell me what elements are highlighted.

Another post uses Duplicate and Collapse, but when I try that it does not give me the elements that are highlighted by the user. Or, it gives me the parent of the elements that are highlighted, neither of which tell me what is highlighted. How can I do this?

Kendall

 48 
 on: March 28, 2019, 04:36:08 PM 
Started by Boyd White - Last post by Derek Read
Yes, the APIs Selection.IsMultiCellSelection and Selection.Cells do not exist in versions older than 13.

You are correct in coming to the conclusion that being able to get the information your script needed was impossible. The information is just not there (without these new APIs). So, prompting the user is as good as it is going to get.

 49 
 on: March 28, 2019, 05:30:36 AM 
Started by tom_w - Last post by tom_w
I'm not sure I completely understand, but in Plain Text view if you click on the line number (left edge of the screen) does it do what you are expecting?

Yes this is mostly what I was looking for. Ideally, if I clicked anywhere on any line
the entire line would show as highlighted while the cursor indicator was still
active
, but this is a start!   Thank you for your reply. 

 50 
 on: March 27, 2019, 04:25:37 PM 
Started by Boyd White - Last post by Boyd White
I have to admit...I am using the ancient Xmetal 2.1
I tried your recommendation Derek and I imagine it would work on newer versions; but not on 2.1
Your recommendation gave me some ideas gave me some ideas but none of them panned out...I just was not able to get the Start and Stop range or cell/entry count of what I selected in a Table Column.
I was able to create a workaround with a couple Input Boxes from the user for anyone interested:

Dim iRows
Dim iIndent
Dim iCountRows
Dim strTabs
Dim i

iRows = cint(inputbox("How Many Cells Downward From The Current Cell Do You Want To Indent: ", "Data Input"))

iIndent = cint(inputbox("How Many &tab; Entities To Apply In Each Cell: ", "Data Input"))

strTabs = ""
 
For i = 1 To iIndent
    strTabs = strTabs & "&tab;"
Next

For iCountRows = 1 To iRows
   
   Selection.TypeText(strTabs)      
   Selection.SelectContainerContents         
        Selection.MoveLeft               
   Selection.MoveDown             
            
Next

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