Discrepancy when running JS in batch mode from Bridge vs. Photoshop

I have an action that calls the following bit of javascript. When I run the action on a single file I have no problem. When I run the action using Batch from Photoshop CS3 I don't have any problems. When I run the action using Batch from Bridge CS3, I get prompted with a dialog box at line 2, I have to hit Enter to get past line 3, and have to hit Enter after the last line. Can anyone explain why the behavior would be different depending on where it's called from? How can I modify the javascript to get around this?
] var docRef = activeDocument;
var layerRef = docRef.artLayers.add();
layerRef.kind = LayerKind.TEXT;
var textRef = layerRef.textItem;
textRef.position = [4, 9.546666666667];
textRef.justification = Justification.CENTER;
textRef.font = 'Verdana';
textRef.size = 10;
textRef.contents = docRef.name.split('_')[1].split('-')[0];
Thanks,
Nate

[email protected] wrote:
> I have an action that calls the following bit of javascript. When I run the action on a single file I have no problem. When I run the action using Batch from Photoshop CS3 I don't have any problems. When I run the action using Batch from Bridge CS3, I get prompted with a dialog box at line 2, I have to hit Enter to get past line 3, and have to hit Enter after the last line. Can anyone explain why the behavior would be different depending on where it's called from? How can I modify the javascript to get around this?
>
You might want to try and put a
app.displayDialogs = DialogModes.NO;
at the top of the script. It should suppress the dialogs.
-X

Similar Messages

  • Photoshop cs5 says "Place" is unavailable when I try to batch process from bridge, does anyone know what's going on?

    I am trying to batch process my watermark from bridge.  I have a saved action in photoshop cs5 and have used it for a while and all of the sudden it says "place" is unavailable.  I have reset bridge and photshop and restarted the computer.  Do actions get corrupt? 

    That is a very common error message actions produce when  for some reason the document current state does not support the command or feature used in the action step that gets the error.  With our seeing a screen capture of the error message and being able to see the document window, the layers palette and the actions palette   Its not possible to tell you why the actions is getting that error message.  Most likely its because of the document current state. For example place is not valid for a bitmap mode document.

  • Getting a COM error when calling MenuItemExecute in batch mode

    I support an internal document management system for our corporate contracts. Among other applications, I have one that runs nightly in batch mode to store new invoices and connect them via bookmarks to their corresponding “parent” contract files. The original program was created in 2005 with Acrobat 7 (later updated to Acrobat 8) and it worked well for several years. However, a few months ago I upgraded the system to Acrobat 9 and since then the program has not run consistently.
    The “program” actually consists of a VB application and two plug-ins. The VB application does as much work as it can with IAC and the JSO bridge, but because the files are (owner) password protected one plug-in automatically applies the necessary password using AVDocDidOpen when the VB application opens the AVDoc. The VB application then also calls the other plug-in using MenuItemExecute. The second plug-in is used to create the bookmarks between the two files by grabbing info off bookmark strings and creating the necessary actions. It also applies the password to the files.
    Here is brief outline form is how this is all structured:
    pdDocParent.Open
             pdDocInvoice.Open
                     avDocParent.Open (This triggers the first plug-in to apply the password)
                             Create bookmark strings in both files using JSO bridge
                                    MenuItemExecute (To create the bookmark action in the parent)
                                    pdDocParent.Save
                            avDocParent.Close
                            avDocInvoice.Open (This triggers the first plug-in to apply the password)
                                    MenuItemExecute (To create the bookmark action in the invoice)
                                    pdDocInvoice.Save
                            avDocInvoice.Close
                    pdDocInvoice.Close
            pdDocParent.Close
    Since the upgrade, I’m getting a COM error [The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))] on a non-consistent basis when the application tries to call MenuItemExecute. When I say “non-consistent” I mean that some days the program will process several hundred files just fine. Other days it won’t process any. Then some days it will not process the first, oh, four files but will process the next 300. Usually it runs fine when started interactively, but even then the error sometimes occurs.
    I recompiled both plug-ins and the VB app using the Acrobat 9 SDK (headers for the plug-in and the Acrobat type library for the VB app) but that didn’t make any difference. I added code to check if the MenuItem is available and it is in all cases.
    After reviewing this more, I got to thinking that perhaps a race condition was the culprit—that a string hadn’t been completely written before the second plug-in tried to create an action for it. So I added some half-second pauses along the way, but that doesn’t seem to have helped, either.
    At this point the only thing I can think of is to rewrite the application as a pure plug-in. But it’s a long and involved application and if I can get the current app to work I’d prefer to do that. I tested it with Acrobat 10.1 and encountered similar problems.
    As I said, it’s been working fine up until Acrobat 9. Does anyone know of anything that might have changed with Acrobat 9 that I haven’t considered? Is there anything else I might check? Thanks.

    Leonard,
    I'd be interested in hearing why you think that because others at Adobe have told me it's OK. Acrobat is only being called by one user at a time and we've paid for a full license.
    Thanks,
    Dick

  • Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.

    Hello guys,
                Problem has been solved -
    Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.
    1. If you install 64 bit oracle this is not an issue. Install 64 bit oracle.
    2. Download odp.net 32 bit  from below link:-
        ODP.NET Managed Driver Beta Download</title><meta name="Title" content="ODP.NET Managed Driver B…
    3. installed the odp.net.
    4. open the visual studio 2010.
    5.Select new - project - asp.net web application - project name -ok
    6.select tools- > connect to database- then follow the following steps
                             i>  user name - your user name/client username (example -- hr)
                             ii> password -- enter your password/client password  (example- hr)
                            iii>select connection type -- if you want to connect client database then- select EZ connect other wise select tns
                            iv>test the connection- then you will get connection succeed.
                            v> then click ok
    Thanks
    Chandrashekhar

    You do not need to do anything in VS.  You do need to configure both tnsnames.ora files, because the drivers do not share any data.
    Please see:
    http://sqlblog.com/blogs/jorg_klein/archive/2011/06/09/ssis-connect-to-oracle-on-a-64-bit-machine.aspx

  • This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.

    hi friends ,
    My report Fetch from the orcle database , we installed Oracle 10g and 11g - clent 32 -bit on win 2k8 -64 bit machine .while design time runing fine,but ofter depolyement im facing below issue.
    In error has occurred during report processing. (rsProcessingAborted)
    The execution failed for the shared data set 'abc'. (rsDataSetExecutionError)
    Cannot create a connection to data source ' Data source for shared dataset'. (rsErrorOpeningConnection)
    Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.
    An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
      Any help is greatly appreciated, I have tried couple of solutions going through some threads online but no use and place dt tell install 1og r 11g 64-bit

    Hi,
    Based on the error message, we should confirm whether Oracle client tool has been installed on the Report Server at the beginning. If the Report Server installed is 64-bit, we should also install a 64-bit Oracle client tool on the Report Server. Besides, we
    can also try to bypass tnsnames.ora file when connecting to Oracle by specifying all the information in the data source instead of using the TNS alias to connect
    to the Oracle database. Please see the sample below:
    Data Source=(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST= server01.mydomain.com)(PORT=1521)))(CONNECT_DATA=(SID=OracleDB)(SERVER=DEDICATED)));
    Reference:http://blogs.msdn.com/b/dataaccesstechnologies/archive/2010/06/30/ora-12154-tns-could-not-resolve-the-connect-identifier-specified-error-while-creating-a-linked-server-to-oracle.aspx
    Hope this helps.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Why do dialogs open for javascript actions when started from a batch operation from bridge?

    I have a fairly simple script (written in javascript) that duplicates the current document and
    does some other manipulations.  I also have recorded an action that executes this script.
    When I run the action manually, everything works beautifully.  When I run the action via
    the batch command from bridge, every operation in the script brings up the associated dialog.
    I am obviously missing something, but what?

    Make sure you have this line at the begining of your script...
    app.displayDialogs = DialogModes.NO;

  • Loading Batch from Bridge-Tools-Photoshop-Batch no screen appears

    Can't get Batch screen to load in cs6 from Bridge-Tools-Photoshop-Batch

    Hello! are you on a PC, a MAC? can we have more info about your machine.
    Is anything non-standard on your setup, for instance: Are you using restricted profiles on a PC?
    The window does not show, there is no error message? is Ps running? does it work from Photoshop? what kind of files are selected?
    If you give all the relevant info directly you'll get your answers faster.

  • When trying to open an image from LR4 in Photoshop CS5 I get a message asking me to download Camera

    When trying to open an image from LR4 in Photoshop CS5 I get a message asking me to download Camera Raw 7.0.  This is not on the Adobe web site.  When will it be available?

    <moved from Adobe Creative Cloud to Bridge General Discussion>

  • Can't Open ACR files from Bridge in Photoshop CC 2014

    I Can't Open ACR files from Bridge in Photoshop CC 2014.  I have uninstalled the programs, and all other versions of PS several times, but no matter what I do, I can't open a raw file I have opened in Bridge, in PS CC 2014. I have to click Open in Photoshop CC 2014 in Bridge.
    Also, on my workstation PC (Win 7 64bit), if I don't open PS prior to opening Bridge, then when I try to open a file from bridge it says it can't run PS on an earlier Operating system than Win 7!
    I have done exactly the same instalation on my notebook, same OS, and everything works perfectly - I just don't understand.

    Guys! This question was asked almost two months ago, and still no-one has replied? I'm still stuck, no matter what I have tried, I cannot find a solution. And please don't ask me to re-install AGAIN, I've done this several times and it simply does not work.

  • Importing selected files from Bridge into Photoshop stack?

    Hi Guys,
    Is it possible to run the "Load files into Stack" script from Bridge having selected your files in Bridge itself. There are work arounds but if this script can be run in this way it would save me alot of time.
    Not sure if the script can be dropped into the a Bridge sub folder or whether or not Bridge can read jsx files? I do seem possible in the fact that some Photoshop scripts can be ran from Bridge but to my knowledge these are not jsx files.
    Basically I just need that to run exactly the same way but be launched from Bridge into Photoshop with those selected files
    Any help would be very appreciated.
    Many thanks.

    I am not exactly sure what you are asking, but I know you can create stacks in Bridge by simply selecting the desired files and pressing ctrl G on the PC (command G on MAC?) I believe there is a forum dedicated to Bridge scripting. You might have better luck there.

  • Opening photo from bridge into photoshop converts to smart object

    Instead of opening the psd-file normally from bridge into photoshop the file converts to smart object.
    I used to work with CS3 where double-clicking in Bridge on a psd-file would open it in Photoshop. Now, when I double click in Bridge (CS6) it opens a "quick time pro" file, which I definitely don't want. When I use the right mouse to "place in Photoshop" it does so, but then automatically converts the file into a smart object, which I don't want either. What need I do to open a psd-file in Bridge as normal psd-file in Photoshop?
    Thanks in advance for help.
    EVAMLG0507

    Hi C. Pfaffenbichler
    yes, there is a "Photoshop Document" in the list, but it has not
    association. when I click on the little arrow on that line it "searches"
    and shows all the files in the "program X86" on the C-drive. but I don't
    know what to associate it with, or said differently, I don't know what file
    in "programX86" to associate it with.
    EVAMLG0507
    2012/9/4 c.pfaffenbichler <[email protected]>
       Re: opening photo from bridge into photoshop converts to smart object created by
    c.pfaffenbichler <http://forums.adobe.com/people/c.pfaffenbichler> in *Photoshop
    General Discussion* - View the full discussion<http://forums.adobe.com/message/4671500#4671500

  • Load files from bridge into photoshop lagers

    I am trying without success to load (two) files from bridge to Photoshop as layers.

    I am not exactly sure what you are asking, but I know you can create stacks in Bridge by simply selecting the desired files and pressing ctrl G on the PC (command G on MAC?) I believe there is a forum dedicated to Bridge scripting. You might have better luck there.

  • Network / external access when booted in single-user mode from install CD?

    So I have this iBook with a semi-functional hard drive: can't boot from it (either normal or single-user), can't use it in Firewire Target Disk mode, can't fix it with Disk Utility, an overnight run with Disk Warrior seemed to be hung, etc, BUT if I boot in single-user mode from the install CD I can then mount it readonly and see at least many of the files on it.
    So now I want to slurp the important ones of those files off of it over the network (or in any other clever way anyone can suggest). I'm not a huge Unix or Darwin expert, so an exact set of commands would be appreciated. *8) A friend suggested to me that I might be able to 'init' it at a 'runlevel' that included the networking stack, but I dunno what that means. *8) Does the CD in fact include a full networking stack? Or anything else that I might be able to use to slurp some data from the hard disk before it gives up entirely?
    Tx very...
    Message was edited by: David Chess; annoying typo

    David
    I think Ronda was hoping you had the Tiger Instal DVD, which has a copy of Terminal on it.
    You said earlier that trying to boot into Target Disk Mode didn't work. Would it help you if you could? If so, I can show you how to do it from Single User Mode. I've done it, and it works, although admittedly I did boot into SU mode from my HD, not my Instal Disc (I have tried that, it also works, I just haven't done both together).
    If you can make use of this, post back and tell me what you get from which nvram when you are booted in SU mode from your CD. It's possible that command won't be available on the CD—so we need to check first. If it says "which: no such command", try ls -l /usr/sbin/nvram instead.

  • Cannot run batch directly from Bridge

    Hi,
    I often work from Bridge and use the TOOLS>PHOTOSHOP>BATCH or TOOLS>PHOTOSHOP>LOAD FILES INTO PHOTOSHOP LAYERS
    This works well except it has just stopped working for no apparent reason. When I try any of the commands under TOOLS>PHOTOSHOP, photoshop will launch or become active but then just sit there doing nothing.
    This has thrown a HUGH spanner in my workflow and is driving me nuts.
    I have tried deleting Bridge/photoshop prefs etc but nothing seems to help.
    I'm guessing it has something to do with Bridge startup scripts or something.
    I can batch via the Photoshop Automate menu but this is nowhere as efficient for me - I then have to hunt for the files etc.
    Weird how it did work then not. The only change I made was installing a new version of ACR, but that was a week or so ago.
    PLEASE HELP!!!!!
    Thanks.

    SOLVED!
    I renamed the folder containing my files and it now works. As far as I can tell there was something corrupt in the folder name - it was originally COPY>PASTed from an email, so maybe there was a hidden character or something else weird that confused Photoshop when it tried to run the script.
    Weird.

  • How to avoid IE pop-ups when running BIP reports(w/ SSO) from Oracle Forms?

    Hi all,
    We have an OID/SSO integrated Oracle Forms and BI Publisher environment in place. We/users expect the same behavior when running Oracle Reports or BIP reports from Oracle Forms... which means receiving no intermediate pop-ups and simply getting the report output to appear in the relevant target application(PDF, EXCEL, etc). Currently we get multiple security warnings when running BIP reports from Oracle Forms.
    Here's a list of Pop-ups contents:
    1. "File Download - Security Warning" Do you want to open or save this file? -> OPEN
    2. "File Download" Do you want to save this file? Name = ma01r500.pdf -> YES
    3. "Save AS" -> pick desktop and save.
    4. "Download Complete" -> OPEN
    We have experimented with setting various IE security settings to LOW/enabled and still get these pop-ups.
    Any suggestions is much appreciated.
    Thanks,
    Yahya

    FYI... Metalink Note 282996.1 has resolved the bigger issue with the extra pop-ups with SSO enabled environment.
    Cause:
    Internet Explorer (IE) has to cache PDF files in a temporary directory prior to opening the file. Without this IE cannot process PDF files. With SSO protected pages, the header cache settings are set to no-cache which prevents IE from downloading PDF files.
    Solution:
    In mod_osso.conf use the entry "OssoSendCacheHeaders off" which tells mod_osso to turn off all no-cache related headers, which the enables Internet Explorer to be cache the file in a temporary directory.
    Now I am not sure if anybody has any thoughts/suggestions as how we might be able to resolve this issue where Oracle Reports WEB.SHOW_DOCUMENT calls have no pop-ups so ideally BIP reports WEB.SHOW_DOCUMENT calls should behave the same as both are calls from Oracle Forms.
    But at least now our SSO enabled environment and un-secure DEV/UAT behave the same with a single pop-up. Ideally the users shouldn't have to come across this intermediate pop-up to open(save/cancel being the other options) the document(just like Oracle Reports calls).
    Yahya

Maybe you are looking for