AH Dynamic Scripts Menu for Bridge

Upload Adobe Bridge Scripts, Download Adobe Bridge Scripts, Support for Individual Adobe Bridge Scripts

Moderators: Tom, Kukurykus

Andrew

AH Dynamic Scripts Menu for Bridge

Post by Andrew »

Hi Mike

There is nothing more useful in developing a script than a user who works with it and provides feedback and suggestions. I consider you a contributor not a 'user'.

You're right on the batch thing. Let me have a fiddle and see what I can come up with. I think I will make the Ctrl+Shift+Click a special option that opens a command window, from which we can provide various options for how to go forward including adding your command string. So on your end, lets say the command will come over as array ah_BatchDataAr. Shouldn't take long.

Andrew
Andrew

AH Dynamic Scripts Menu for Bridge

Post by Andrew »

I am releasing V1.1 which adds an advanced option in the Select Target Application dialog, when you click on Advanced, the dialog expands to show:



1. Click Mode: a choice of four radio buttons to set the defaul left-click behaviour.

This determines what a simple left-click will do for your target script (or scripts if you are loading a group of scripts at once).

If you select BatchOCL, then when you left-click the script in the menu it will run in Batch Open / Close mode (normally you need to Shift+Click to do this).

Similarly, BatchLO gives you Batch leaving selected files open in the target app, and Data is the option where the list of selected files plus any supplementary data is sent to the target script.

2. The second set of options allow you to prompt for User Data Input before runnning the target script. This is in response to Mike Hale's suggestion above. For this to work you MUST click the Prompt for Data Input checkbox, as well as specify your requirements in the next two fields.

The prompt will open in Bridge when you run a script that has the Prompt for Data checkbox ticked. Here is an example:



You can see I set the Prompt message to 'this text' and preset the prompt value to 1,2 - consistent with the input from the first image. This allows you to give instructions that will help yourself or other users to remember what is required in the prompt eg 'width then comma then height'. But bear in mind that prompts do not allow you much text, they will need to remain short. You cannot use either ? or | in any of these fields as I use those in the script for separators.

Going back to the stage where you were setting these options via the Edit Script List function, you need to restart Bridge to make the chages effective. If you then reopen the Edit Script List again and look at the script list, you will see that scripts with advanced options have their values shown in the list - so the last script in the image below had Click Mode 2 and was set to prompt for Data input.



For the data input to be used you need to reference it in your script, where it will appear as the string: ah_DataArString. If you include separators such as commas within this string you are able to split it into an array and thus transfer multiple values from the single prompt message.

Remember that the Data Transfer option (click mode 4) also sends the file object list to the target script, where it has the variable name: ah_BridgeFilesAsString, which can be converted to JS File Object with eval(ah_BridgeFilesAsString).

This script also fixes a number of bugs in the earlier script.

When you run the script for the first time it will delete the existing list of file targets and issue a message about Corrupt File List Data. Don't worry, just restart Bridge again and recreate your list with the enhanced control options and you will be away.

Any problems, feedback, requests please get back to me here.

Andrew
Andrew

AH Dynamic Scripts Menu for Bridge

Post by Andrew »

I am thinking the next version is likely to dispense with all of the Bridge Menu listings except for the Scripts Menu itself. When you click on Scripts Menu it will open the edit list dialog, and you will be able to run your scripts straight from that. If you shift+click the Scripts menu it will run the last selected script without dialog.

I am interested on any feedback as to whether you think this a good idea or a bad one. I can see five advantages.

1. When Bridge menus go wrong, they tend to go very wrong, this avoids that problem entirely.

2. This method is probably faster to use, especially the shift-click for the last selected script option.

3. Currently, the Bridge context menu for menu items (target scripts) seems to have a limit of 14 scripts, using the dialog the limit is closer to 50.

4. There is more info about the scripts in the dialog - eg click-mode and prompt for data status.

5. It will be easier to add further options via the dialog without having to build them into the menu system.

Any thoughts? I rather like the existing system, it is elegant but I am not sure it is as robust or as practical.

Andrew
Andrew

AH Dynamic Scripts Menu for Bridge

Post by Andrew »

A hint on usage for the Batch leave open option - it is more useful than it might seem. Use it if you:

- want to do some additional things to the image after the script has run, either manually, or via an action.

- want to save the files in some way that requires special input (for example you now want to save the files in tiff format wheras they were previously psd's) - usually this can be dealt with by creating an action with the specific save options, allowing you to customise your script while staying with full automation.

- want to save your files to a different folder - again this can be bound up in an action.

OK, now here's how to customise your script so you attach the action from within the script. Just add the following line at the end of the script:

doAction('myactionName','myActionSet');

Now the action will run whenever you run the script. Even better, when you want to change, for example, the folder target, you can do it by editing the action without bothering to mess with the script.

Andrew
Andrew

AH Dynamic Scripts Menu for Bridge

Post by Andrew »

I have uploaded a slighly modified V1.1 (V1.11) which has a minor bug-fix. A complete revision will be out in about 2 weeks - easier and faster to use with improved batching capability.

Andrew
Andrew

AH Dynamic Scripts Menu for Bridge

Post by Andrew »

After many weeks of work AH Bridge Launch 2 is released as a beta. This script is far more powerful than my Dynamic Scripts Menu which you find in this thread, but in fact the two scripts are quite complementary and the coexist fine. I suggest you check out both threads before deciding what you want to download.

bb/viewtopic.php?t=293

Andrew