Get the path of the active document from Photoshop

It works in Photoshop and Bridge script (Javascript)

var myPath = activeDocument.name;

Tester.PSD

This only works in Photoshop script (JavaScript), but not in the bridge.

var ProcessFolder = activeDocument.path

actually stops the script, without error or warning.

How can I get the path to the file in the active document in Photoshop through Bridge?

Thank you!

Hello

You can use BridgeTalk to communicate between applications

In this case, there is the code and you must run it from the bridge to get the information you need for photoshop:

// run this from Bridge to get the path of the active document
// if photoshop is not running, it gives that message
// if photoshop is Busy, it gives that warning
// if photoshop has any images opened, it avoids getting the path and warn you

pathFromPS();

function pathFromPS() {
    var bt = new BridgeTalk;
    bt.target = "photoshop";
    bt.body = '(app.documents.length > 0) ? app.activeDocument.path : "No active images";';
    bt.onResult = function (resObj) {
        activePath = resObj.body;
    }
    if (BridgeTalk.getStatus (bt.target) == 'IDLE') {
        bt.send(3);
    } else {
        activePath = (BridgeTalk.isRunning(bt.target)) ? "[Busy]" : "[Not Running]";
    }
    return activePath;
}

Tags: Bridge

Similar Questions

  • File name of the active document

    Hello friends,

    Now that I managed to find quotes (special strings) in paragraphs, notes, tables and table notes - all with your generous help - I need to know the name of the file (path) of the current document (or book).

    All I've found is how to get the name of an element of the book file (finally that I need too, but later).

    How can I find the file name of the active document (which is not part of a book) and

    How can I find the file name of the current book?

    Thanks again for your help

    Klaus

    Friends,

    Suddenly, I found the answer (research in the reference of the oject for 'Filename' rather than 'file name' - 'path' in the FDK reference):

    alert ("Now processing book\n"+ app.ActiveBook.Name);
    alert ("Now processing document\n"+ app.ActiveDoc.Name);
    
  • How can I get the activation code for PC Defender?

    I have a dell netbook.  It has viruses on it.  PC Defender is constantly on it saying that if I put in the activation code sent to my e-mail address, it will remove the virus.  The code was never sent.  I can't access it from my netbook, but I can check my email from my other laptop.  How can I get the activation code so can clean my netbook?

    PC Defender is a rogue security application.  It is also a malware!  You can remove it by following these instructions:
    http://www.bleepingcomputer.com/virus-removal/remove-Windows-PC-Defender
    Trader2100

  • How to get the active screen of the BlackBerry application?

    Hello

    I'm trying to get the active screen of the BlackBerry application, for example the home menu.

    I tried to use the screen ActiveScreen = getUiEngine () .getActiveScreen () in my code, but found error during execution.

    I know that this is because the getActiveScreen() method applies only for screens created by this application.

    So is there a way to capture the screen of the other application, for example the mail filter BlcackBerry?

    Thank you.

    Not wanting to not to repeat me, but there is no general way to get access to the Screen of another application object, unless you are on good terms with this application - which basically means that you have access to the instance UiApplication.  You cannot ask the operating system to get that to you, you must have a way to get you.  Which implies execution of something in the context of the Application.

    Even in this case, you may not be able to do what you want.  You will probably need to iterate over the screen and content managers and find the field you want, and even if it covers anything you understand (like BasicEditField) it still cannot handle standard things like setText in a way that is useful to you.  And you might not find fields you recognize, if you access a browser screen, I think you'll find there \are RIM not standard fields in there, so there is nothing you can interact from a standard application of the RIM.

    If you want to do this kind of treatment in General, that will deal with in a number of applications, you should watch event Injection.

    There may be other options for specific applications.  For example, you can simulate of electronic mail by writing a program that sends an email, rather than interact with the BlackBerry.  Or for the same application, if you try to test the headphones, then the listener has access to the UiApplication.  Aye, we be able to help you find approaches less General in some places, if we understand what you're trying to do.  This is the reason for the specific question that I asked in my last post.

    Regarding your second question

    "Another question is, can two separate applications of myself interaction by the user interface?

    For example, to call app2. ButtonField.click () or something. »

    It is in fact just an extension to your first question.  The difference is that you will find the UiApplication associated if both applications are on good terms, in fact you can "spend" the UiApplication via a Global event.  Once you have the UiApplication, you can use

    .invokeLater (...)

    to run the user interface code in the other Application.

    But I look at injector event because I think it might be a more general solution.

  • Is it possible to get the activation code of the older PC so that I can use it in my class?

    Original title: Activation of Windows 8.

    If there is some time I had windows 8 pro to use in my construction of future games. Not knowing I could install it on 1 computer (thought it would be at least 2) I installed it as a test on my desktop PC previos where it has not yet run properly cause it was an older model (and if you haven't used since then, cause I have a laptop with Windows7). But now my PC gaming is finished and I suddenly find I could activate only on 1 PC.

    So my question is. Is it possible to get the activation code of the older PCs (that I use even more, maybe even remove it) so that I can use it in my class? Or that the activation code and the money just went in the toilet?
    I could install Windows 7 to 2 different PC-s(didn't try more cause there was no need) with no problems and it wasen can't pack family, why is Windows 8 different? Sometimes errors occur.
    Ask cause I went all on buy the parts, I have no money to buy a new copy of windows 8.
    Awayting for your answers.
    Thank you
    Edit! Maybe I'm a solution. Going to try it out after I return to work.
    It's the solution

    "I have Windows 8/8 Pro is installed on my PC." If I replace with another PC, can I install my copy of Windows 8 on my new PC until I remove it from the other? »

    Yes. The highest point is the one you mentioned: you must remove Windows 8 from your old computer before you activate on the new. In other words, you can have your copy of Windows 8 or Windows 8 Pro running on a single computer at a time.

    Another thing to keep in mind is that if you have installed an upgrade copy under license of Windows 8 on a computer and then you want to use it on another computer, the same 'upgrade' rules apply: you must have a previous version of Windows on the computer before you install Windows 8. You can ignore this rule, if you started with Windows 8.1

    Important: You can't "move" Windows 8 or Windows 8 Pro on another computer if your computer is pre-installed with Windows 8. Your copy of Windows 8 is what OEM licensed which means that you are allowed to use Windows 8 on the computer on which he came already installed on.

    "How many times can I reinstall Windows 8 on another computer? Assuming I follow the rule 'uninstall old installation', peux I keep installing Windows 8 on different computers? »

    There is no limit to the number of computers that you reinstall Windows 8 on as long as you follow the rules, that I discussed in the last question.
     

    Hi NeemeK,

    We appreciate the research you have done to find more information on this issue. The information you found were correct.

    OEM product key can only be used with the computer on which it is installed on.

    When the operating system is not active (uninstalled) in the old computer, you can install it on the new computer. This applies to any number of computers you use.

    If you get any errors, you can perform the activation of the phone.

    http://support.Microsoft.com/kb/950929/en-us

    Hope that the information provided is useful. Do not respond if you need more help.

  • Get the message "Documents.library - ms" is no longer. Cannot find my documents.

    Bought a new laptop from Lenovo with windows 8, which worked fine for about 8 months.  Now when I try to open my documents folder, I get the message, "Documents, library-ms" is no longer.  Followed by: this library can be deleted safely.     How can I access my documents and return the library to use for storage?

    Thanks for the help, Ronnie.  I was able to restore the Documents and photos, etc.  There was an additional step.  When I initially would be to right click on the right pane Documents icon, removing was not an option.  However, updating changed options so that I could remove and then restore it later to each of the four files.

    Thanks again,

  • How to print ONLY the active document?

    Whenever I go to file/print program PSE 9 darn all working files sends in the tray of the printer. I searched online for 2 hours, now looking for an answer.

    I enjoy working with several to several files in the 'bin' and prefer to print only the active file, I am currently working on without having to close the "working files" before I can print. How can I print ONLY the active document or file in the location of project? Please help, I upgraded from PSE 3 PES 9 and really like the updated features, but what a pain in the neck by default becomes the best of me.

    Select it in the trash before calling to the top of the print window. If nothing is selected, everything happens in the print window.

  • Digitally sign all Signature fields in the Active Document

    I have a script that will sign a unique digital signature with the name of the field field.

    I need to see the script so that it will sign in fields many/any signature in the active document without having to put the name of the field in the script, as domain names vary with each document.

    Can someone advise please how do I change the script to sign all the fields in the active document, regardless of the domain name?

    function myOtherTrustedFunction()
    {
    app.beginPriv ();
    Get and connection to the Security Manager

    var oSigHdlr = security.getHandler ("Adobe.PPKLite");
    oSigHdlr.login ("123", "/ c/Documents and Settings/name/Application Data/Adobe/Acrobat/10.0/Security/FirstNameLastName.pfx");

    Signature properties configuration

    chk var = this.getField ("Checked");
    If (chk! = null) {}

    Apply the Signature and store it in the original file

    bRtn var = chk.signatureSign ({oSig:oSigHdlr, bUI:false, oInfo: {password: "123"}});
    }

    app.endPriv ();
    }

    Any help will be most appreciated.

    How about this:

    var myEngine = security.getHandler("Adobe.PPKLite");
    myEngine.login("123", "/c/Documents and Settings/name/Application Data/Adobe/Acrobat/10.0/Security/FirstNameLastName.pfx");
    
    for (var i = 0; i < numFields; i++) {
    
        // Get the current field object
        var f = getField(getNthFieldName(i));
    
        // If it's a signature field and not already signed, sign it
        if (f.type === "signature" && !f.value) {
    
            // Sign the field
            f.signatureSign(myEngine, {password: "123"});
    
        }
    }
    
  • How can I get the filtered data from the first form

    How can I get the filtered data from the first form in a second form to make an update of the multi.
    Thank you very much

    William,

    I would use for this collections. A link is good if you need to pass a single value.

    1. create a collection
    2 fill the collection with your result set
    3. go in the page target and uses a method of a query in your link to this page
    4. your target page receives a request and allows you to edit documents.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • did not get the activation key with my Windows 7 Home records. How do without pay $49 for technical support?

    did not get the activation key with my Windows 7 Home records. How do without pay $49 for technical support?

    You can connect to the Microsoft Store and retrieve your product keys:

    Find your key product if your purchase of Microsoft Store:
    http://store.Microsoft.com/Help/FAQ?Err=T2#AT2

  • What kind of image is in a document. INDD so when the file is opened you get the message 'document contains 6 links to sources that are missing' and when you click OK to recreate a link to missing files, the document opens with the images?

    What kind of image is in a document. INDD so when the file is opened you get the message 'document contains 6 links to sources that are missing' and when you click OK to recreate a link to missing files, the document opens with the images? Missing images are not on my computer, but when the document opens the images are there. I can copy and paste the INDD images in Illustrator. Y files/images/I am able to copy and paste the images that have been incorporated into the INDD file in AI of the INDD file? If this is not what type of image am I copy and paste? Can I take the images that I stuck in there and place them in a new INDD document and have the images to reproduce without problems?

    The images could be anything - check the links Panel.

    What you see (and copy) is just the screen preview, not the actual image data.

  • I have upgraded to Windows 10. I have Adobe InDesign CS3. It runs but requires a reactivation. I get the activation message - no connection.

    I have upgraded to Windows 10. I have Adobe InDesign CS3. It runs but requires a reactivation. I get the activation message - no connection. There is no other way to activate - no phone support. I also tried uninstalling and reinstalling. It makes no difference.

    Hi Peter,.

    Thanks for your time. I solved this by chatting to the support team. I have

    convince them to issue me with an authorization code that you normally would

    Get the phone activation which is no longer supported in the United Kingdom. This seems

    having solved the problem of Activation.  I suspected that the final result would be

    be that they'd tell me that CS3 doesn't run on Windows 10 but for now

    It seems OK.

    Kind regards

    Dave

  • How to add a character style in the active document

    Hi experts

    How to create a character style in the active document.

    How to make the script work.

    Thank you

    Respect of

    John

    var myCharacterStyle;

    myDocument var = app.activeDocument;

    var myCharacterStyle = myDocument.characterStyles.add({name:"c"});)

    myCharacterStyle.strikeThru = true;

    myCharacterStyle.strokeColor = 'Black ';

    myCharacterStyle.add)

    There is not much to say about your code. Only the last line would cause a problem. A possible hiccup is also on the fact that the style may already exist when you want to add.

    myDocument var = app.activeDocument;

    var myCharacterStyle = myDocument.characterStyles.item ('c');

    ! myCharacterStyle.isValid & myCharacterStyle = myDocument.characterStyles.add({name:"c"});)

    myCharacterStyle.strikeThru = true;

    myCharacterStyle.strokeColor = 'Black ';

  • Where can I get the installation document, or present to hav?

    Where can I get the installation document, or present to hav?

    Thank you!

    George

    Configuring ports only really, you must ensure that you redundant management - here is the guide of the vmware vmware HA - http://www.vmware.com/pdf/vsphere4/r41/vsp_41_availability.pdf of creation

    If you find this or any other answer useful please consider awarding points marking the answer correct or useful

  • Cannot complete the activation of my photoshop elements 11 because the serial number is not recognized

    Cannot complete the activation of my photoshop elements 11 because the serial number is not recognized

    Hello

    That your serial number has 24 digits starting with 1057?

    [Note: Please don't quote your number as this is a public forum]

    If your number is not like that can be a redemption code. See if the following can help.

    http://helpx.Adobe.com/x-productkb/global/redemption-code-help.html

    If you can still get it accepted, you need to contact Adobe - see end of this document, there may be a Chat button.

    Brian

Maybe you are looking for

  • Displaying a video iPhone to iCloud

    I wasn't able to post a video from my iPhone to iCloud, photo sharing.  The video is 04:34 minutes long, so seems to be within the specifications given by Apple (max. duration 5 minutes if I understood).  I tried the iPhone (4 s iOS 9.3.4) and iMac (

  • After creating the new partition Boot Camp of fixation

    Hi, I tried to resize my Windows 10 bootcamp but changed my mind, when I deleted the empty partition without title and will reboot my computer to start with Windows, it does not appear (I pressed the option key alt is told by the way). So a way to so

  • File open in CVI

    Hello I discovered a small weird breakdown. Now, let me now if this is normal. In my application, I would like to simply open a file to read. FILE * fp = NULL;FP = fopen (g_FileName, "r");if(FP == null)MessagePopup ("error", "File can not be loaded."

  • security question - I deleted my certificate of security by mistake

    I deleted my certificate of security by mistake what I cannot do updates and it says invalid security certificate? I can't roll back something.

  • Aurora-R4, maximum hardware upgrades

    Dear all Currently I plan to update my beautiful Alienware Aurora R4 I bought at the beginning 2013 These are my current features: OS: 8.1 64-bit Windows CPU: Intel Core i7 3820 @ 3.60 GHz Sandy Bridge Motherboard: Alienware 07JNH0 BIOS A11 Graphics