I don't see a way to restrict checkbox selection in the Medit dialog box to only one out of X. Is this possible?
You need a radio button for that.
I appreciate your response!
Medit doesn't seem to support the radio button option.
Can you show the code you have? I don't know Medit yet. Is that part of the ScriptUI library?
I have always used the Dialog anf built my own controls, rather than using the layout manager. In cases where a radio button was not possible or not desirable but I still wanted a similar effect, I added some code on each of the check boxes that unchecked all the other boxes. A bit of code might help in offering better help.
Thanks for your response!
I think you have Extendscript in mind while I am writing a Framescript.
Here is the relevant piece of code:
Set vEdit1 = '';
Set vCheckBox1 = 0;
Set vCheckBox2 = 0;
DialogBox Type(Medit) Title('Sample Dialog')
Label1('Enter the URL:') Edit1(vEdit1)
IF vButton = CancelButton
The dialog allows selecting both of the checkboxes. I'd like to make them mutually exclusive. But I don't see a way to do that in this context. The problem is that before clicking OK, there is no way to check if both checkboxes are selected.
OK, yes, FrameScript instead of ExtendScript explains the confusion. I have stopped using FrameScript after ExtendScript was brought to FrameMaker in version 10. The main reason at the time was not forcing my customers to download and install a third party product. Not because it was not worth the money, but my customers were lone writers in a large organisation and could not install anything, as their computer - and especiallly the Program Folder - was owned by IT, who would not allow any external stuff in there.
I don't know if FrameScript has something like events in the dialogs. I am sure Rick Quatro can answer this, as he has been working in FrameScript a lot longer than I have.
Yes, you are right. I would prefer to use ES but the problem is that it is not as user-friendly as Framescript and it is not documented properly. For an inexperienced user, who creates scripts sporadically, it is much easier to use Framescript as it is at least documented properly. For many years, Adobe promised to provide better ES documentation but so far no detailed guide is available. Not everyone has time to play with ES and learn it based on trial and error only.
Have you ever checked if it is possible to bind an extendscript to a custom button on a custom FM toolbar? This is quite easy to do with Framescript but not sure if this can be done with extendscript as well. AFAIK, extendscripts can only be hooked into a menu/dialog but not to a button on a toolbar, but maybe I am wrong.
I have completely replaced FM's toolbars with customized ones, using my own icons and extenscripts that are fired by these buttons. This is what my customer sees when they open an XML document.
Short answer: yes, I have. 🙂
Not sure why you had to replace the original toolbars, but I guess you had a good reason for that.
The toolbars needed to go because this application does not allow any editing, just formatting in FrameMaker. The buttons do lots of stuff under the hood, make sure they cannot make stupid mistakes and also make sure that everything is correctly entered into the XML. Very specific application and the most elaborate customising of FrameMaker I have done until now.
I appreciate your response!
Not sure why you mentioned HTML dialogs. The FM pods don't look like anything related to HTML. What am I missing?
Regarding FM19 - I have no plans to upgrade as the trial version of FM19 really disappointed me (probably, my expectations were too high). Even if I wanted to give it a second chance, I can't as the trial had expired. I am staying with FM13 - the most stable FM version I had so far.
No, the older versions had Pods with no HTML whatsoever. They were introduced in FM2019 (although the HTML based welcome screen was there earlier). With HTML dialogs, a lot of UI techniques become available that are simply impossible in ExtendScript dialogs. It is not the easiest in coding but very powerful.
Sorry to hear you were disappointed with the FM2019 release. A lot of effort for that release went into upgrading all the code to 64 bit and using the latest libraries of included components. It was a major overhaul and may have left some with the impression that not much was done. I have been creating tons of heavy-duty scripts in FM since verison 10 and have seen so many crashes, as I was always pushing FM to the limits of what it can do. I am seeing an immense drop in crashes with FM 2019 even though I am doing far more dangerous stuff than I ever have before.
Not everyone may need this, but if you do want to get some serious automation going there is really no reason to stay with older versions of FM believing that they are more stable. FM 2019 64 bit is more stable than any version I have seen before. This may not be true for the first release but it is certainly the case with the latest update.
I now see what you meant. Thank you for the information, Jang!!
HTML-based dialogs definitely offer more flexibility.
Looking forward to seeing your blog! I am sure it will be the best ES resource ever created.
My Best Regards,
There is a very good ScriptUI reference by Peter Kahrel. It goes into far more depth than the original Adobe document. There's a link to the PDF file on this page: ScriptUI for dummies | Peter Kahrel .
Great. Thank you for the pointer, Ian!