0

perhaps one can help me with some scripting snippets for:

A) supress/ignore open and save Dialog in Actions with PS-script

B) supress Color warnings while opening

C) toogle on/off a dialog box next to an action (inside a action with e.g. bluring dialog box, this should run with standard values) I know, I can toogle it on/off next to actions manual, but I will do this with script

D) remember all changes done in a actions dialog for first running of batch job and do all the same configs an other images. Otherwise the dialogs will shown up for every picture. (Perhaps one additional script asks me "run original again", "load previous config)

Hope you can help me? I will programm some scripts for usage with other batch processors or pixelsplasher´s mockup smart replace.

This code I´ve found it works for simple scripting.

// ASSUMING DIALOGS ARE CURRENTLY SET TO NO/OFF
var savedDisplayDialogs = app.displayDialogs;

// CHANGE THE DIALOGS TO ON

//app.displayDialogs = DialogModes.ALL;

// CHANGE THE DIALOGS TO OFF

app.displayDialogs = DialogModes.NO;

//======================================

// MAIN SCRIPT CODE TO DO STUFF...

var act = "action"

var actset = "actionset"

app.doAction(act, actset);


//======================================

// RESTORE THE DIALOGS TO THEIR ORIGINAL SETTINGS
app.displayDialogs = savedDisplayDialogs;

Is it possible to save all settings while running an action for the first time and safe this next to the main psd file as a XML sidecar. So it would adjust all follow pictures with the preference. (like sidecar xml on lightroom). When I will run run the job again, it should load the sidecar. So it must check, if the sidecar is available. Or I can load this sidecar with a dialog and save this with a dialog prompt?

Because I will run this script first, than run several actions. One time with a "master action" starting the script and run actions, one time with image processor or other batch scripts (with actions load options) or with pixelsplaher smart replace script (here I´m able to import a jsx).

0

1 Answer 1

0

Only a workaround idea (brainstorming) when a action is recorded and I will convert this to script, is it possible to do a "converter script" for this generates action-to-javascript file (a extended xtools action-to-jsx converter tool). Perhaps it is also possible to generate a jsx loader with these options?

an additional converter script with a menu (load action for xtools converter, load jsx to: convert, disable/enable dialogs, disable/enable filter prompts.

  1. record action (incl. prompts and dialogs, no change)

  2. run xtools action to javascript

  3. within this file searching (true,true) for the last "function step... lines" (each line for a recorded action line) and change it to (true,false) - theses run function lines with parameter (true,false) will supress dialogs of filters.

  4. within this file do to disable standard dialog prompts at beginning and end:

    if (app.displayDialogs == DialogModes.NO){ app.displayDialogs = DialogModes.ALL; } else { app.displayDialogs = DialogModes.NO; };

  5. save this jsx

perhaps insert a global variable on top like "globalNoDialog = false" to change all function steps to "false". And perhaps it is possible to save the changed values before step3? (to toogle between original code and modified code like a switch ON/OFF)

At this moment the easiest way is to duplicate the action, change parameters till they are OK for this picture and disable the dialog-checkbox for this action. Now I can insert this in my batch process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.