Input suppression for specifc XML nodes (structured FM document)
Hi,
Is there a way to suppress input or changes in specifc nodes (structured FM document)?
Thank you for any pointer.
Regards
Apollo102
Hi,
Is there a way to suppress input or changes in specifc nodes (structured FM document)?
Thank you for any pointer.
Regards
Apollo102
Hi Apollo102,
First of all, I have to apologize that I didn't realize I was in the scripting area of the forum. I threw out the idea of scripting casually as if it were a remote possibility for you, but obviously that was what you came here for. So my initial response had a silly context to it.
I'm impressed that you moved so far so quickly. This business of notifications and constants can become tricky. Here are some answers to your questions....
Is this an acceptable way? My answer is yes. It's the way I would do it. Note this though... more than likely, once you run the script and activate the notifications, you will need a FrameMaker restart to turn them off. Maybe you could turn them off with a Notification() call somehow in the same script afterwards, but I'm not sure. Either way though, this is just the nature of the ESTK environment and just something to be aware of.
Where can you find a complete list of action constants? A most excellent question and one without a good answer, that I am aware of. These values are based on something called "fcodes" from the original FDK implementation and are defined within an fcodes.h file within the FDK. Here is an excerpt of this file that shows the definition for what you called "KBD input" (3750):
#define KBD_API 0xDF0 /* Dynamic (API clients/config) */
#define KBD_API_SHORTCUT 0xDF1 /* API used only from shortcut */
#define TYPEIN 0xDF2 /* OUTPUT-ONLY: Text type-in */
#define INLINE_TYPEIN 0xDF3 /* Inline input for Asian text */
#define KBD_VIEW_API 0xDF4 /* Dynamic (View API clients/config) */
#define KBD_VIEW_API_SHORTCUT 0xDF5 /* View API used only from shortcut */
#define KBD_VIEW_SWITCH 0xDF6
All values in this file are defined in hexadecimal format, so the value 3750 is equivalent to 0xDF2 in this file, that is, the TYPEIN constant.
You could go get this file and browse through it, but constant names are sometimes cryptic and there are many, many hundreds of them. So my suggestion is this... just put an alert box in your code that displays the event code, then manually do whatever action you think should be restricted and see what code pops up. I see a line of code already in your sample that will do just that... I think you could just uncomment that. Maybe move it under the element tag conditional. In this case, that's likely how I would determine the correct codes.
Hope this helps.
Russ
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.