Block Messages From Framemaker

New Here ,
Mar 01, 2019 Mar 01, 2019

Copy link to clipboard

Copied

I have developed a script that converts ditamaps into framemaker books.  Due to the size and number of books to be created this script must run overnight.  Seemingly randomly framemaker creates a popup message that warns me it doesn't know where referenced images files are located and that the images will appear as grey boxes.  This popup prevents the script from running until someone clicks the "ok" button, at which point it will resume.  Is there a way to prevent framemaker from generating these popups?

TOPICS
Scripting

Views

4.3K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 06, 2019 Mar 06, 2019

Copy link to clipboard

Copied

OK, here is a possible solution. I remembered that Adobe had sent me some code for this, but apparently I didn't try it. Copy the code below into a file and put it into your startup folder. It should suppress the message. I tried it with the test in my earlier post and the dialog box did NOT appear. See what happens when you run your automation scenario and let us know. Thanks.

Notification (Constants.FA_Note_Alert, true);

function Notify (note, object, sparam, iparam) {

   

    switch (note) {

       

        case Constants.FA_Note_Alert :

       

            if (/Cannot display some imported graphics/.test (sparam) === true) {

                ReturnValue (Constants.FR_YesOperation);

            }

            break;

    }

}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 06, 2019 Mar 06, 2019

Copy link to clipboard

Copied

By the way, I always enjoy head-jamming with guys like Jang and Klaus. I have learned a lot from you guys. I have the greatest respect for you all.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 06, 2019 Mar 06, 2019

Copy link to clipboard

Copied

So this should be an extendscript toolkit jsx file that targets Framemaker 2019 and runs from my windows startup folder?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 06, 2019 Mar 06, 2019

Copy link to clipboard

Copied

Yes, make sure it has a .jsx extension. It goes in

C:\Users\<UserName>\AppData\Roaming\Adobe\FrameMaker\15\startup

where <UserName> is your Windows login name. If the startup folder does not exist, then create it. The script goes in the startup folder.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 07, 2019 Mar 07, 2019

Copy link to clipboard

Copied

LATEST

Following these instructions I was able to get the script to appear in my FM 2019 autorun library.  However It failed to suppress the message.  I'll try again tonight having removed this line from my save function that wasn't blocking the message anyway, but could be interfering with this script.

    i=GetPropIndex(saveParams,Constants.FS_AlertUserAboutFailure);

    saveParams.propVal.ival=false;

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 06, 2019 Mar 06, 2019

Copy link to clipboard

Copied

I will try "DontNotifyAPIClients" but I'm not hopeful.

The scripting guide says: DontNotifyAPIClients Specifies whether to save the file without notifying other clients. The value is one of:

• False - Notify other clients.

• True - Do not notify other clients.

I interpret this to mean that when this param is true Framemaker is not allowed to communicate with applications that are not ExtendScript toolkit.  For example it would block Framemaker for interfacing with Acrobat to create a PDF.

However, this dialog box is internal to Framemaker so I doubt it relies on an API.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 05, 2019 Mar 05, 2019

Copy link to clipboard

Copied

Just try to add this:

i=GetPropIndex(openParams,Constants.FS_AlertUserAboutFailure);

openParams.propVal.ival=false;

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines