Possible to run a photoshop script by selecting files in Bridge?

Hi,
I have a good script I've written that I always used to run from Photoshop. The script has a dialog box which asks where to get the files from. Is it possible to select files in bridge and run the script from there? Without rewriting it for Bridge?
Thanks,
Stan

> I have a good script I've written that I always used to run from Photoshop. The script has a dialog box which asks where to get the files from. Is it possible to select files in bridge and run the script from there? Without rewriting it for Bridge?
Yes, this is possible. However, a much easier solution is to select the files in
Bridge then switch to PS manually to run your script. It avoids having to having
to write any code to run in Bridge at the cost of not having seamless integration.
In xtools/xlib/XBridgeTalk.jsx I have a set of functions that simplify working
with Bridge from within PS. For instance:
var files = XBridgeTalk.getBridgeSelection();
will return an array of Files that are currently selected in Bridge. If Bridge
isn't running or if no files are selected it returns an empty array.
-X
for photoshop scripting solutions of all sorts
contact: [email protected]

Similar Messages

  • How to run script on selected files in Bridge

    I have a script that takes an open Photoshop document and saves it to four different resolutions in different folders. I'd like to be able to select files in Bridge and run the script on the selected files instead of having to do it each image individually in PS. Anyone know how to do this? Thanks!
    Eric

    MarkWalsh wrote:
    A fairly easy way, you can add your script to the 'Scripts' menu, then create an action that calls this script (use 'Insert Menu Item' to add to your action) and call this action through a batch in Bridge. One issue with this, though, is that it does require creating an action to specifically call the script, I don't know if you can call the script directly from Bridge.
    I haven't scripted Bridge at all myself, but I believe you should also be able to rewrite your script to get the selection in Bridge, and process those files in Photoshop.
    If your script is set up to process one file at a time, the Bridge/Batch technique is the simplest way to do it.
    If your script needs to know what all of the files are before it can begin processing, you have to add a Menu element in Bridge and have it call your action/script in Photoshop. A bit more complicated, but there are a lot of examples of this at ps-scripts.com.
    -X

  • Is it possible to run one ud script to update parms for multiple servers...

    Is it possible to run one ud script to update certain parameters in mib for multiple
    servers by giving multiple occurrences of the parameter and server id. I tried
    a ud script as follows and it seem to update the parameter for only the first
    server.
    SRVCNM .MIB
    TA_CLASS T_SERVER
    TA_OPERATION SET
    TA_SRVID 101
    TA_SRVID 102
    TA_SRVID 103
    TA_CLOPT -A -r -e srv1.err --
    TA_CLOPT -A -r -e srv2.err --
    TA_CLOPT -A -r -e srv3.err --

    From the ud's output, it looks like it used only one occurrence of the fields that
    I provided.
    "james mathew" <[email protected]> wrote:
    >
    Is it possible to run one ud script to update certain parameters in mib
    for multiple
    servers by giving multiple occurrences of the parameter and server id.
    I tried
    a ud script as follows and it seem to update the parameter for only the
    first
    server.
    SRVCNM .MIB
    TA_CLASS T_SERVER
    TA_OPERATION SET
    TA_SRVID 101
    TA_SRVID 102
    TA_SRVID 103
    TA_CLOPT -A -r -e srv1.err --
    TA_CLOPT -A -r -e srv2.err --
    TA_CLOPT -A -r -e srv3.err --

  • 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.

  • Photoshop crashes when selecting File / Automate / Batch

    Photoshop users still need a fix for Photoshop crashing whenever they select Batch.
    I understand that Adobe staff has chosen to blame scanner drivers for the problem. And, I've read the discussions thru last year (very long and boring when all you want is a fix). But, I'm not settled on several things which do not add-up.
    First, I'll review the symptoms for the sake of all interested readers. Photoshop users have reported Photoshop crashing whenever they select File / Automate / Batch from the menu for years. This problem got much worse (widespread) since the release of version 12.0.4. The problem apparently affects only those with Train compatible scanners and who installed Adobe's optional Twain plugin. I never read how anyone came to this conclusion, but scanner drivers are being blamed. The accepted work-around is to disable or remove Adobe's Twain plugin.
    Second, I want to point out that Photoshop works normally when using the Twain plugin. I can scan images and they are imported directly into Photoshop without any problems. This was the case before the 12.0.4 update and is still the case now.
    Third, I want to pose my most pressing question. What does selecting "Batch..." have to do with scanner drivers? In other words, what possibly could Photoshop be doing with scanner drivers when selecting "Batch..." that it does not do when actually does use the drivers?
    Lastly, I'll point out that I am a software developer of over 30 years. So, I understand how it might somehow work out in the details that the source of the problem really is buggy scanner drivers. However, as a programmer with a lot of experience dealing with problems common in device driver API's, I know that good practice is to expect anything. If Photoshop begins a process that calls out to someone else's software API, it should cushion that call with proper exception error handling. All processes should execute with an "if all else fails" contention.

    >> What does selecting "Batch..." have to do with scanner drivers?
    When running the actions for the Batch command, Photoshop updates it's menu/command state to check which commands are enabled or disabled based on the document state being changed by the actions.  Part of that update is calling the scanner interface to see what is available or not, and at that point some drivers crash.  Since the crash occurs in third party code executed within Photoshop's context - there was not much Photoshop could do to recover (there was exception handling, but it couldn't work across OS and DLL boundaries).
    In Photoshop CS6, we spent quite a bit of time figuring out why they were crashing (apparently there was some assumption about the application GUI state), and how we could avoid them crashing in those circumstances - and now CS6 avoids the crashes in the Batch command even with the TWAIN plugin and drivers are loaded.

  • Script to select files in a folder based on extension

    Does anyone have a script that would select files in a folder based on extension, then move the files somewhere else?

    Hi Kagey and welcome!
    You have to be completely accurate about the path. If your hard disk is called "Macintosh HD", then it's
    every file of folder "Macintosh HD:Applications:FileMaker Pro 6 Folder" whose name extension = "tab"
    You can generalise this for other users if you can't be sure about the name of their hard disk:
    set apps_folder to path to applications folder as string
    set fmp_folder to apps_folder & "FileMaker Pro 6 Folder"
    tell application "finder" to get every file of folder fmp_folder whose name extension = "tab"
    HTH
    H
    PS - well done in the footy

  • Extract metadata from selected files in bridge

    I used to use extensis portfolio to quickly export metadata from selected files to create print worksheets. I could customize which metadata would be displayed.
    For instance:
    Thumbnail
    title
    pixels
    file type
    date created and modified
    height and width
    dpi
    embedded icc profile
    file location
    iptc description
    It was a quick drag and drop process, but portfolio is now only available in the server edition for over $1000. Does anyone have script for Mac OS that would accomplish this?
    Thanks!

    Hi Xiaojing,
    Thank you for your answer. It is useful.
    The problem is: My application is not going to play music or video, it just needs to browse over the disk and create a list of available music files including info like song name, album, artist. All this info is kept in meta-data. Some users can have a lot of music of their computers. That's why I don't want to load the whole file and wait for onMetaData event - it can take a long time. I just want to read the meta-data from the file, but not to load the all file as I need for listening the music of playing the movie.
    I already applied extracting meta-data for MP3 files exactly the way you mentioned, it works fine. I only have to wait for Event.ID3 – I implemented Timer to wait until all my files are processed. Probably, if user has a lot of music on his computer, it will take a lot of time.
    I can try to read AAC the way you advice.
    I am really looking for implementation of your advice for reading the music file as a ByteArray and extracting meta-data. In this case we don't need to load all the file, but just to read part of it.
    Do you have some code implementation?
    Thank you again for your response,
    Elena

  • Is it possible to run a shell script from AIR?

    I can not scan a local directory unless on of my installed files is chmod
    755. i want to run a script on init() that will chmod 755 a file in the bin-debug directory.
    Thanks in advance for your assistance.

    Problem: I have a Perl script in my AIR App's install directory that needs executable permissions on a Mac.
    Solution: Chmod the file in my AIR App.
    My code looks something like the following:
    if (Capabilities.os.indexOf("Mac OS") > -1) {       
                        var dlFile:File = File.userDirectory;
                        var _chmod:File = new File("/bin/bash");
                        dlFile = new File(file);
                        var nativeProcess:NativeProcess = new NativeProcess();
                        var chmodStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
                        chmodStartupInfo.executable = _chmod;           
                        var args:Vector.<String> = new Vector.<String>();
                        args.push("-c"); 
                         // Trace so I can make sure the command and path are correct in the debugger              
                        trace ("\"chmod ugo+x '"+dlFile.nativePath+"'\"");
                        args.push("chmod ugo+x '"+dlFile.nativePath+"'");
                        chmodStartupInfo.arguments = args;
                        nativeProcess.addEventListener(NativeProcessExitEvent.EXIT, onExitError );
                        chmodStartupInfo.executable = new File(file);                       
                        var process:NativeProcess = new NativeProcess();
                        process.start(chmodStartupInfo);  
    I really hope this helps someone else.

  • Script to select file source

    basically what i'm looking for is a command to:
    identify the open file (in any application)
    select that file in finder so that i can do with it what i want through automator /applescript
    i want this to be available under the "service" tab in the application menu
    so say i have a pages application open, i go to "pages" --> "services" and then click the service i've just created which selects this file at it's location in the finder and does my desired action
    thanks for your help!

    I believe that you would need to develop a cocoa application to add items to the Services menu. Another approach would be to use the Scripts menu.

  • Opening a document in photoshop and running a ps script

    I'm trying to write a script which will open a link in photoshop (which I have managed to do with Link.editOriginal) and also run a photoshop script after the file is opened. I have looked in online references and the PDF's found on this site, but I can't seem to find a function which will let me run a ps script from inside Indesign. Is there any method of doing this, or am I out of luck?
    Thanks for your time.

    Gerald Singelman told me to check the status of a link in a loop before executing the update()-command.
    This is the updated version:
    // resizeInPS04.jsx 
    //DESCRIPTION: Resizes every link in PhotoShop 
    var theScale = 150; // scaling factor in % 
    var theResolution = 72; 
    var theResampleMethod =  'ResampleMethod.BICUBIC'; 
    var myChoice = confirm ('Warnung! \rBei Ausfühurng dieses Skriptes werden unwiderruflich alle verknüpften Bild-Dateien verändert. Machen Sie vorher Backups der Dateien.' ); 
    if (myChoice == false) 
      exit(); 
    var myLinks = app.activeDocument.links; 
    for ( var i = myLinks.length-1; i >= 0; i-- ) 
    ResizeInPS( myLinks[i].filePath, theScale, theScale, theResolution, theResampleMethod ); 
    while (myLinks[0].status == LinkStatus.NORMAL )
    // think about the weather
    myLinks.everyItem().update(); 
    for ( var x = myLinks.length-1; x >= 0; x-- ) 
    myLinks[x].parent.fit( FitOptions.FRAME_TO_CONTENT ); 
    function ResizeInPS(myPath, myHorScale, myVerScale, myResolution, myResampleMethod) {  
       var bt = new BridgeTalk;  
       bt.target = "photoshop";  
       var myScript = 'try {\n';  
       myScript += 'var myPsDoc = app.open(File(\"' + myPath + '\"));\n';  
       myScript += 'app.preferences.rulerUnits = Units.PERCENT; \n' ;  
       myScript += 'myPsDoc.resizeImage(' + myHorScale +', ' + myVerScale + ', ' + myResolution + ', ' + myResampleMethod + '); \n' ;  
       myScript += 'myPsDoc.close(SaveOptions.SAVECHANGES);\n';  
       myScript += '}\n';  
       myScript += 'catch (myError) {\n';  
       myScript += 'myPsError += \"myError' + myPath + '\";\n';  
       myScript += '}';  
       bt.body = myScript;  
       bt.send();  
    Martin

  • Call Photoshop script from Indesign script CS4 JS

    Hi, I open Photoshop linked file from InDesign in Photoshop and I need same InDesign script to run Photoshop script on the file. How I can call the Photoshop script from InDesign script.
    Thank you very much for your help.
    Yulia

    Thank you, Kasyan.
    800 lines of script is little be intimidating.
    What we are trying to achieve is to open jpgs in Photoshop and resave them as tiffs and replace same jpg with corresponding tiff in Indesign as it was placed before.
    Is there a way to call Photoshop from Indesign through appleScript.
    I have most of the script done for Indesign and I have Photoshop shript ready that saves jpgs as tiffs done. I am only missing the part where I can call this existing Ph. script from Indisign.
    We prefer not to use BridgeTalk if possible, because we have a lot of programs open and running in the same time, and would like to avoid to open one more program (BridgeTalk).
    Thank you very much for your great help.
    Yulia

  • Run a plsql script that is stored in a database in forms

    Hi there is it possible to run a plsql script that is stored in a database as a CLOB with parameter placeholders that will be replaced with the contents that will be inserted in a form? If it's possible how do I do this?
    Regards

    I don't think you can pass a parameter in Francois' example. You probably need a wrapper procedure as explaind by W1zard. So, the question pops up: why can't you create a stored procedure instead of an anonymous block in a clob column? If you do need it, it could look something like:
    Code in the table:
    begin
      insert into emp(empno,ename)
      values (:1, :2);
    end; 
    {code}Wrapper procedure:
    {code:java}
    create or replace procedure call_script(i_empno in number, i_ename in varchar2) as
      v_stmt   varchar2(32000);  -- CLOB is not possible, because execute immediate cannot use it.
    begin
      select replace(script_code,chr(13),chr(10)) 
      into   v_stmt
      from   script_table
      where  script_id = 1;
      execute immediate v_stmt using i_empno, i_ename
    end; 
    {code}
    Edited by: Ino Laurensse on Jan 22, 2009 10:52 AM
    Edited by: Ino Laurensse on Jan 22, 2009 10:58 AM
    (forum had some problems. Old code was posted first)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • I want to create xml file using photoshop script and also i can easily add, modify, delete based on file name

    Hi,
    Please help me for this.
    I need to create XML file for mentioned below. when i run the photoshop script i need deatails for active document name, date, time and status.
    <?xml version="1.0" encoding="UTF-8"?>
    <sample>
    <filename>Cradboard_Boxes_Small.tif</filename>
    <date>today date</date>
    <starttime>now</starttime>
    <status>delivered</status>
    </sample>
    <sample>
    <filename>Cardboard_Boxes_Student_Vaue_Pack.jpg</filename>
    <date>today date</date>
    <starttime>now</starttime>
    <status>delivered</status>
    </sample>
    I need read that xml after creating and modify based on file name. i need to modify status after file finished.
    if the file name is already exist i want to modify or delete or add whatever i need.
    Kindly help me simple way

    You may want to look into getting Xtools ps-scripts - Browse Files at SourceForge.net then.  Most of the support is for ActionManager script code where XML code is use as an intermediate step.  There are quite a few Photoshop script in XTools .   Ross Huitt is an expert javascript programmer though is is fed up with Adobe's lack of support for Photoshop scripting particularly the bugs in ScriptUI he is still maintaining tool he  has created for us free of charge. Tools like Image Processor Pro. None of his scripts are save as binary so you can read all of his code there is a wealth of knowledge in there....
    Also there is a scripting forum Photoshop Scripting

  • Is it possible to run a command when a monitor goes to a healthy state?

     
    Hi,  I'm using SCOM 2007R2
    Is it possible to run a command/script when a web application Monitor changes to a healthy state?
    I have a web application monitor that checks four different websites from our proxy servers.  on the aggregate rollup of all four sites I have a health rollup policy of 'Best state' meaning
    that the monitor will only go critical if all four sites are unreachable. If that happens I have a Diagnostic task that runs to Stop the w3svc service.
    This stops the proxy server serving ‘Page cannot be displayed’ content to the users within the company.
    What I would like to do is start IIS automatically when the web application monitor goes to a healthy state.
    I’m guessing I’m going to need a script that perhaps pings the sites every few minutes then starts the w3svc service if it gets a result.

    Hi,
    I recommend you touch the Orchestrator, Orchestrator can integrate
    SCOM.
    Use Orchestrator to design a Runbook for your task. When the state of a web application Monitor changes to healthy, then run a command/script.
    System Center 2012 Orchestrator.
    Orchestrator is a workflow management solution for the data center. Orchestrator lets you automate the creation, monitoring, and deployment of resources in your environment.
    For more information, please review the link below:
    System Center Integration Pack for System Center Operations Manager 2007 R2
    http://technet.microsoft.com/en-us/library/hh531770.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Photoshop scripting question

    HI
    I am new to this whole scripting for photoshop and hope someone could help me along.
    What i am looking for is to either create an Adobe Photoshop script, or with flash builder build an photoshop extension that does the following.
    On a server i have a folder that gets a folder for each day of the month (eg. ../december 2012/01 december). in this folder each day there are .PSD files created. I would love to have a scipt that opens the .PSD files that are in the todays folder then resizes the image from 1024*576 to 720*576 and save it on a diferend server in the todays folder as a .JPG. and then have a popup message showing which images where succesfully saved to the new location.
    Right now i am using a simple .exe file with the following script to kopie teh files from location A to B but i have to manualy make the jpegs or run the image procesor for this job which doesn't work with sharing an action with multiple users.
    The copie script is Use:
    @ECHO OFF
    CLS
    SET sourceDir=\\172.16.200.9\vormgeving\TV\!BrabNieuws 2007\dve
    SET destDir=\\172.16.200.155\dve\BRABANT NIEUWS
    SET jaar=%date:~-4,4%
    SET mnd=%date:~-7,2%
    SET dag=%date:~-10,2%
    SET pse==%1
    IF %mnd%==01 SET maand=Januari
    IF %mnd%==02 SET maand=Februari
    IF %mnd%==03 SET maand=Maart
    IF %mnd%==04 SET maand=April
    IF %mnd%==05 SET maand=Mei
    IF %mnd%==06 SET maand=Juni
    IF %mnd%==07 SET maand=Juli
    IF %mnd%==08 SET maand=Augustus
    IF %mnd%==09 SET maand=September
    IF %mnd%==10 SET maand=Oktober
    IF %mnd%==11 SET maand=November
    IF %mnd%==12 SET maand=December
    ECHO De DVE's van vandaag worden naar de dagmap (%jaar%-%mnd%-%dag%) gekopieerd!
    ECHO .
    COPY "%sourceDir%\%maand% %jaar%\%dag% %maand%\*.psd" "%destDir%\%jaar%-%mnd%-%dag%"
    ECHO Y | DEL "%destDir%\%jaar%-%mnd%-%dag%\dve standaard.psd" > NUL
    if "%1"=="" PAUSE
    I hope there is someone out there that can help me on my way.
    Thanks
    Salvador
    Ps. I already tried working with actions and a simple script that envoked the action file but thats just not stable enough.

    JJMack wrote:
    I still do not understand you showed part of a dos bat file that copies a single psd file from one remote ip  resource to a different remote ip remote resource before the copy some non english message is displayed. the copy is done which should put out a message one file copied then the original file is deleted off the first remots resource hidding the delet message.  I see nothing to do with Photoshop nothing that dose any resize and don't understand why you would slow down the copy by transporting the data across the network twice once woul be faster. I would set up a remote process where remote resource 1 would do the copy to remote resource 2.  At first I tought you were describing a server batch update process the would run on some schedule. Now it looks like distrinuted remote users are moving a file from one machine to an other.  Where does the resize come in where does Photoshop Scripting come in?
    SET sourceDir=\\172.16.200.9\...
    SET destDir=\\172.16.200.155\...
    ECHO De DVE's van vandaag worden naar de dagmap (%jaar%-%mnd%-%dag%) gekopieerd!
    ECHO .
    COPY "%sourceDir%\%maand% %jaar%\%dag% %maand%\*.psd" "%destDir%\%jaar%-%mnd%-%dag%"
    ECHO Y | DEL "%destDir%\%jaar%-%mnd%-%dag%\dve standaard.psd" > NUL
    Hi JJMack,
    Right now the resizing is done maunually. This is the work procces; there are a bunch of .psd files created these get saved in ..\\ntsrob22s\vormgeving\TV\!BrabNieuws 2007\dve\february 2012\07 february\.
    After these files get aproved they get maunualy distorted from 1024*576 to 720*576 and saved as a JPEG in ..\\ntsrob22s\vormgeving\TV\!BrabNieuws 2007\dve\february 2012\07 february\JPEG\. After the person is done they execute this file
    @ECHO OFF
    CLS
    SET sourceDir=\\ntsrob22s\vormgeving\TV\!BrabNieuws 2007\dve
    SET destDir=\\media-storsvr\dve\BRABANT NIEUWS
    SET jaar=%date:~-4,4%
    SET mnd=%date:~-7,2%
    SET dag=%date:~-10,2%
    SET pse==%1
    IF %mnd%==01 SET maand=Januari
    IF %mnd%==02 SET maand=Februari
    IF %mnd%==03 SET maand=Maart
    IF %mnd%==04 SET maand=April
    IF %mnd%==05 SET maand=Mei
    IF %mnd%==06 SET maand=Juni
    IF %mnd%==07 SET maand=Juli
    IF %mnd%==08 SET maand=Augustus
    IF %mnd%==09 SET maand=September
    IF %mnd%==10 SET maand=Oktober
    IF %mnd%==11 SET maand=November
    IF %mnd%==12 SET maand=December
    ECHO The PICs are copied to the BRABANTNIEUWS day folder and are ready to be used by pixelpower (%jaar%-%mnd%-%dag%) gekopieerd!
    ECHO .
    COPY "%sourceDir%\%maand% %jaar%\%dag% %maand%\JPEG\*.jpg" "%destDir%\%jaar%-%mnd%-%dag%"
    ECHO Y | DEL "%destDir%\%jaar%-%mnd%-%dag%\dve standaard.JPG" > NUL
    if "%1"=="" PAUSE
    This looks in the folder ..\\ntsrob22s\vormgeving\TV\!BrabNieuws 2007\dve for the folder of 'today' and copies all the JPEGs to ..\\media-storsvr\dve\BRABANT NIEUWS\ into todays folder.
    What i would like to create is that after they have created all the PSD files and they are aproved, all they have to to is run a Photoshop script or extension that opens all the PSD's that are in the 'today' folder -> then resizes those to 720*576 and save them in the \\media-storsvr\dve\BRABANT NIEUWS\"todays month"\"todays date" and overwrites if there is one with a simular name already.
    Thx,
    Salvador

Maybe you are looking for

  • How to record video in black and white mode

    Hi, I am developing a live video recording application and my application  have black and white mode recording feature, So please give me some idea  about black and white recording. Thanks Ram

  • Does the alarm clock drain the iPhone 4 battery?

    My iPhone 4 battery drains overnight and I was wondering if the alarm clock has something to do with it. If this is not the case, is there a way to not have the battery drain overnight? Please let me know of anything you know to conserve battery life

  • Unable to switch on mbp

    WWhy I can't start up my MacBook pro, cant detect the power cord as well, no light indicated it's plugged in. Does anyone has same issue before and fixed it. It happened while i plugged in my iphone usb, mbp just gone off like that.

  • Python script, "No module named 'new'"

    Hi, I'm trying to run a python hot-corners script from here (at the very bottom of that page). Unfortunately I'm presented the following output: $ /tmp/hot-corners.py Traceback (most recent call last): File "/tmp/hot-corners.py", line 6, in <module>

  • Learn spring framework from scrach

    hi, all i m new to spring, is there any good book for people like me to learn Spring? i currently have a 'Manning, Spring In Action' 2nd edition(2007), but i found it's quite confusing coz the sample code in the book is not very clear and helpful. co