Copy link to clipboard
Copied
After spending too much time combing through the OMV, looking (unsucessfully) for information online, and then just falling back to simple trial-and-error, I thought it was worth sharing a couple of things:
So, in it's simplest form:
codes = new Array();
codes[0] = FCodes.TXT_BOLD;
Fcodes(codes);
Copy link to clipboard
Copied
Oliver,
I join your disappointment regarding the current status of the OMV as much as the non-existing documentation.
The Fcodes() function can be found in the OMV in the Command class (handling menu commands). It seems to me the OMV has no method to present stuff at multiple locations.
- Michael
Copy link to clipboard
Copied
The content for the OMV seems to be defined in an XML file, so this must be a simple omission. Having said that I can find the omv XML files for InDesign but not FrameMaker... I have sent a message to the scripting documentation team highlighting the problem.
Ian
Copy link to clipboard
Copied
Having said that I can find the omv XML files for InDesign but not FrameMaker...
For me it is here:
C:/Program Files (x86)/Common Files/Adobe/Scripting Dictionaries CS5/FrameMaker/OMV.xml
Interestingly, all other OMV files are named lower-case omv.xml.
BTW, I had to reinstall the ExtendScript Toolkit 3.5.0 before being able to update to 3.5.1.
- Michael
Copy link to clipboard
Copied
Thanks Michael,
Mine was there too. Windows 7 indexing isn't really working for me.
Copy link to clipboard
Copied
The Fcodes() function can be found in the OMV in the Command class (handling menu commands).
What I see in the OMV under the Command class are two read-only properties (one that returns the value for a single fcode and another that returns an array), not a function.
Are you seeing something different?
Copy link to clipboard
Copied
>> The Fcodes() function can be found in the OMV in the Command class (handling menu commands).
What I see in the OMV under the Command class is are two read-only properties (one that returns the value for a single fcode and another that returns an array), not a function.
Are you seeing something different?
No, we see the same. I was not looking close enough (or have to get used to the icons in the OMV).
So there seems to be missing a group of "really global" functions like Fcode() or Console() and maybe others.
Sorry,
- Michael
Copy link to clipboard
Copied
Michael,
There is a Globals class and I believe that's where the missing methods should be listed. The following are methods that I can't find in the OMV (There are a few other methods I'm not sure about):
Ian
Copy link to clipboard
Copied
The following are methods that I can't find in the OMV (There are a few other methods I'm not sure about):
AddCommand() Console() Dimension() Fcodes() OpenAnyHow() SaveAs().
I think I have the mixed disadvantage/advantage of not coming from a FrameScript background. I'm guessing at least some of the missing commands you mentioned are particular to that platform, as they're not mentioned anywhere in the FDK Reference.
For example, while there is no AddCommand(), the app class does have a NewNamedCommand() method, 'Save As' is achieved by setting the appropriate saveParam ProvVal (FS_SaveMode/FV_ModeSaveAs) before calling Save(), and OpenAnyHow() sounds to me like a handy set of openParam PropVals set to FV_DoOK. (Like I said, I don't know FrameScript, so please excuse any blatant ignorance that's showing)
My hope is that it won't be long before we start to see .jsx libraries that replicate the functionality of some of FrameScript's robust features.
Copy link to clipboard
Copied
Nothing to do with FrameScript. All of these 'missing' methods were found in the ESTK data browser but only when FrameMaker is the target application. There are also some UI related methods that are not related to ScriptUI...
Ian
Copy link to clipboard
Copied
Oliver,
The simplest form for your example could be reduced further to:
Fcodes([FCodes.TXT_BOLD]);
Ian