I need to create an action or script to save the file with the name of the selected layer

I need to create an action or script to save the file with the name of the selected layer (not including the hidden layers, but including those visible).
How could modify the script: 'Layer Comps To Files.jsx' to get the result?
Warning: I do not need to export all layers as files.
Who can help me?
THX in advance

Versione in Italiano (Further down the English version)
NB - Nella versione inglese ho messo tutte le immagini dei menu in italiano.
Versione per Mac, ma credo sia identico per Windows.
Spiego passo passo cosa ho fatto:
- Ho creato un file esempio con tre Livelli, salvato sulla scrivania e ho chiuso il file.
- Ho aperto il file e selezionato il Livello al centro per iniziare a registrare una azione che ho chiamato: Save with Name of Selected Layer
- Nuova azione
- Dare il nome e premere Registra
Ora salva…
- Menu --> Livello --> Nuovo --> Livello... e premi -ok-, (lascia il nome che viene mostrato)
- Ancora una volta Menu --> Livello... --> Nuovo --> Livello... e premi -ok-, (lascia il nome che viene mostrato)
- Menu --> Livello --> Ordina --> Dietro
- Menu --> Livello --> Unisci sotto
- Menu --> Livello --> Unisci visibili
- Menu --> Livello --> Nuovo --> Livello... e premi -ok-, (lascia il nome che viene mostrato)
- Menu --> Livello - Nascondi Livello
- Menu --> Elimina --> Elimina livelli nascosti (press -Yes-)
- Menu --> Livello --> Nuovo --> Livello... Inserisci questo: 'Move this to the trash' e premi ok
- Menu --> File --> Script --> Esporta Livelli in File... (Nella finestra che si apre scegliere l’opzione che si desidera, ma togliere il prefisso del nome) e premere -Esegui-
- Selezionare il pannello Storia cliccare su Elimina premendo -Si- ogni volta che si apre la finestra di dialogo (Ripetere 8 volte questa operazione sino ad arrivare nella storia alla condizione di partenza. Ho visto che è meglio di Ripristina -F12-)
- Fermare la registrazione.
A questo punto, mandando in esecuzione questa Azione, ho raggiunto parzialmente l’obiettivo perché i file così creati mantengono, purtroppo, dei prefissi numerici per evitare probabilmente la sovrascrizione di file (credo senza avviso) nel posto dove vengono creati.
Per ottenere l’obiettivo occorre un nuovo passo ed a proposito di questo riferisco quanto segue:
ATTENZIONE - L’operazione descritta qui di seguito deve essere fatta su di una copia del file, per cui:
- Duplicare il file,
- Spostare l’originale in altra cartella
- Lavorare sul file duplicato.
mi riferisco a questo...
ATTENZIONE - Questa modifica è effettuata a proprio rischio e pericolo ed il sottoscritto non si assume alcuna responsabilità su quanto venga fatto soprattutto da mani inesperte.
ATTENZIONE - Questa modifica sovrascrive qualsiasi file che abbia nome uguale al layer che viene selezionato più l’estensione del file naturalmente.
Comunque la modifica è banalissima e a portata di chiunque.
Procedere così:
- Chiudere Photoshop
- Aprire (nel percorso specificato dall’immagine) il file “Export Layers to Files.jsx” (Export Layers To Files.jsx 1.0.0.16) con un editor di testo puro.
- cercare la stringa (dovrebbe essere in riga 1029)
var fileNameBody = fileNamePrefix;
fileNameBody += "_" + zeroSuppress(i, 4);
fileNameBody += "_" + layerName;
- sostituirla con:
var fileNameBody = fileNamePrefix;
fileNameBody += layerName;
- cercare la stringa (dovrebbe essere in riga 1047-46)
var fileNameBody = fileNamePrefix;
fileNameBody += "_" + zeroSuppress(i, 4) + "s";
- sostituirla con:
var fileNameBody = fileNamePrefix;
fileNameBody += "";
- salvare e uscire.
- riavviare Photoshop
- provare l’azione registrata facendo attenzione che il nome del layer non sia identico al nome di un file già presente altrimenti questo verrà sovrascritto.
Domanda:
Perché ho creato livelli che poi ho eliminato ecc.
Risposta:
Semplice per evitare errori di esecuzione delle azioni nel caso di operazioni con livelli mancanti o altro.
Semplice... no?
English version
Mac version, but I think it's the same for Windows.
First of all, I'm translating the actions that I made using the Italian version of Photoshop, you look at the position of the menu that I have chosen to do the work with other languages.
I explain step by step what I did:
- I created a sample file with three layers, saved to the desktop and I closed the file.
- I opened the file and select the layer at the center to start recording an action that I called: Save with Name of the Selected Layer
- New action
- Give the name and press Save ( I think it is so in English )
Now save ...
- Menu -> Layer - > New —> Layer… and press -ok- , (leave the name that is shown)
- Once again Menu -> Layer - > New —> Layer… and press -ok- , (leave the name that is shown)
- Menu -> Layer - > Arrange (order) -> Behind
- Menu -> Layer - > Merge Down
- Menu -> Layer - > Merge Visible
- Menu -> Layer - > New —> Layer… and press -ok- , (leave the name that is shown)
- Menu -> Layer - Hide Layer
- Menu - > Delete - > Delete hidden layers (press -Yes- )
- Menu -> Layer - > New —> Layer… Enter this: ' Move this to the trash ' and press ok
- Menu -> File - > Scripts -> Export Layers To Files... (In the window that opens select the option you want, but take away the name prefix) and press - Run -
- Select the History panel and click Delete (on menu opened) pressing -Yes- every time when open the dialog box (8 times Repeat this step until you get into the story to the starting condition. Not use Restore -F12-).
- Stop recording.
At this point, by executing this action, I have reached the goal partly because the files created in this way remain, unfortunately, the numerical prefixes to avoid possibly overwriting of files (I think without notice) in the place where they are created.
To achieve the goal we need a new step and thinking about this as follows:
WARNING - The operation described below should be made on a copy of the file, so :
- Duplicate the file
- Move the original folder to another
- Work on the duplicate file.
WARNING - This modification is performed at your own risk and the undersigned assumes no responsibility on what is done mostly by inexperienced hands.
WARNING - This change will overwrite any files with the same name as the selected layer plus the file extension of course.
However, the change is trivial and within reach of anyone.
Proceed as follows:
- Close Photoshop
- Open (in the specified path from the image ) file " Export Layers to Files.jsx " (Export Layers To Files.jsx 1.0.0.16) with a pure text editor.
- Search for the string (should be in line 1029 )
var = fileNameBody fileNamePrefix ;
fileNameBody = + "_" + zeroSuppress (i, 4 ) ;
fileNameBody + = "_ " + layerName ;
- Replace it with :
var = fileNameBody fileNamePrefix ;
fileNameBody + = layerName ;
- Search for the string (should be in line 1047-46 )
var = fileNameBody fileNamePrefix ;
fileNameBody + = "_ " + zeroSuppress (i, 4) + "s" ;
- Replace it with :
var = fileNameBody fileNamePrefix ;
fileNameBody + = "";
- Save and exit.
- Restart Photoshop
- Try the recorded Action, making sure that the layer name is not identical to the name of an existing file otherwise it will be overwritten.
Question:
Why I created levels which I then deleted etc..
Answer:
Simple to avoid errors of execution of the actions in the case of transactions with missing levels and other.
Simple ... is not it?
Sorry for my bad English...
Thanks in advance for any hint.
--->>> Please think about this... Adobe <<<---

Similar Messages

  • How can I automatically create the files with serie-name?

    Hello, Everyone,
    I have a question again.
    How can I automatically create the file with a serie-filename?
    e.g. I have a program, it will repeat 5 times, and every time it will create a bmp-file, and I want to let this program automatically save these 5 files with a Serie-filename like File001.bmp, File002.bmp, .... File005.bmp.
    How can I do it?`
    Thanks a lot.
    Regarts,
    Johnny

    Hi Deepu,
    one more comment
    The format code should be "%04d" to get leading zeros and have filenames with same length...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • I am trying to create a print ready PDF from a word file with unacceptable results.

    I am trying to create a print ready PDF from a word file with unacceptable results.
    The word file has a trim size of 6” x 9”. It has been set to mirror margins with the inner, top and bottom margins set to 0.75”, the outer margin is set to 0.5” and the gutter to 0.14”.
    It doesn’t matter if I create the PDF from inside Word, or open Acrobat Pro 11.0.9 and click Create From File, while the resulting document size is correct and the odd numbered pages reflect the correct margins, the even numbered pages do not. This results in some text near the outer margin, as well as the page numbers being omitted.
    Does anyone know how to correct this?
    I just noticed that some of the odd numbered pages' text is also cropped. Apparently Acrobat is refusing to set side margins to smaller than 1" (@ 3cm).

    I'm away from my printer, so I'll try it later. Even so, the proposed test is irrelevant. I operate a small publishing house and am trying to upload certain novels to Ingram, the largest book distributor in the world. The specifications I've set are the specifications they've asked for. Since they've said that the results I'm obtaining are unacceptable, and since they demand submission in PDF form, this renders Acrobat Pro for Mac completely unacceptable for anyone in the publication industry. As far as I can tell, Adobe has a serious bug here that it needs to fix—and at once.

  • I started to learn HTML, and I'm using text edit and everything is going fine, when I save the file with a .html extension and open it with safari I only view the code and not the webpage that was supposed to be created.

    I started to learn HTML, and I'm using text edit and everything is going fine, when I save the file with a .html extension and open it with safari I only view the code and not the webpage that was supposed to be created.

    That is because you don't have a web server configured and running to serve the html page. In order to see the page in a browser you need to access it using a url similar to http://localhost/~yourUserName if you are serving the page from your user account.
    Prior to Mountain Lion you could go into web sharing and turn on the web server. With Mountain Lion there is no option, other than using terminal, to turn on the web server. The web sharing menu item has been removed in Mountain Lion. Apache is still on your computer but it will take a little searching these forums or the Internet to find how to turn it on.
    If you want a graphic user interface to turn on/off the Apache server you could download and install a server application like xampp, http://www.apachefriends.org/en/xampp.html. I use this and it works well.

  • Search multiple folders for files with same name and create single file

     I have a project where I need to search multiple folders for a file name and when found append data from each file to a single input file.
     Example
    root folder to start search
    \\servera\sales
    \\servera\it\salesa\cmmstr.txt
    \\servera\it\salesb\cmmstr.txt
    \\servera\it\salesc\cmmstr.txt
     I need to create a a single cmmstr.txt on the root folder. I would like it to be able to run this with parms to pass in folders to search and file names to search and single file name to create. I'm going to have a least 10 differnt files to
    search for and create output file for. The folders to search
    will somewhat be static.
     Thanks.

    I tested this out on my own seat and I think it should work for you. I wrote it as a function, all you have to do is pass the root folders you want to search and the file your looking for. The function will then search that directory and all sub directories
    for that file name. you will also have to provide it a file to append to, if the file dosen't exists the function will create it. If you run into an issues let me know and the links Mike
    Laughlin posted are a great resource.
    Function Search-Files{
    Param([String[]]$Locations, $SearchFor, $AppendTo)
    Begin
    If(-Not (Test-Path $AppendTo)){New-Item $AppendTo -ItemType File -Force}
    Process
    ForEach($Location in $Locations)
    $Files = Get-ChildItem -Path $Location -Filter $SearchFor -Recurse
    ForEach($File in $Files)
    Get-Content -Path $FIles.FullName | Out-File $AppendTo -Append
    End{}
    Search-Files -Locations "\\Server1\c$\Temp", "\\Server1\c$\Test1" -SearchFor "Install.cmd" -AppendTo "C:\Temp\Search.log"

  • VB Script to move a file with date in name

    I'm so stuck but I know Im close.  So its friday and I'm brain dead and I'm asking for some help please.
    I have FILES starting with dates
    140729HDF0.835
    140730HES0.835
    140731UHG0.835
    and I need to move the files that are dated in the file's 2 days back.
    Dim ObjFso
    Dim SourceLocation
    Dim DestinationLocation
    Dim FileName
    Set ObjFso = CreateObject("Scripting.FileSystemObject")
    dteYesterday = DateAdd("d", -1, Date)
    SourceLocation = "c:\835old"
    DestinationLocation = "c:\835new"
    FileName = (Year(dteYesterday), 2) & Right("0" & Month(dteYesterday), 2) & Right("0" & Day(dteYesterday), 2) & ".835"
    ObjFso.MoveFile SourceLocation & "\" & FileName, DestinationLocation & "\"
    It's something in my FileName= because if I simply change it to
    FileName = "*.835"
    its works.  Can anyone help please??

    This approximates what you need to do:
    Set fso = CreateObject("Scripting.FileSystemObject")
    strFileDate = Right(Year(Now-1),2) & Right("0" & Month(Now-1),2) & Right("0" & Day(Now-1),2)
    source = "c:\835old"
    destination = "c:\835new"
    folder = fso.GetFolder(source)
    For Each fi In folder.Files
    If Left(fi.Name,6) = strFileDate Then
    fso.MoveFile fi, destination
    End If
    Next
    ¯\_(ツ)_/¯

  • HT1461 For Boot Camp, if you save a file when you are on the Windows side, when you return to the Mac side, can you see the file or can it only be "seen" on the operating side you create it in?

    For Boot Camp, if you save a file when you are on the Windows side, when you return to the Mac side, can you see the file or can it only be "seen" on the operating side you create it in?

    Why don't you  (generic most every post lacks critical details) be clear and say you never used Mac OS etc.
    But, I did try to anticipate and give you what you needed.
    Excel is one of those rare programs that, if they are extremely large complex spreadsheets still tend to run better under Office for Windows.
    A VM won't do for that but it does make it easier to transition. As in: install Windows natively, then use VMware Fusion or Parallels to attach to the partition and OS. That way you can run Windows as Guest OS VM under Mac; and still run Windows natively dual-boot when needed.
    The word "see" was not what you wanted, was it? really? you want to open and make changes and keep it on Windows side rather than Save As or copy to Mac
    You use Windows and don't know it has NTFS (NT FileSystem)?
    http://en.wikipedia.org/wiki/NTFS
    http://en.wikipedia.org/wiki/Hierarchical_File_System (HFS) native file system used by Apple
    And there is much more UEFI style "bios" and other things I suppose.
    Great thing about Google and encyclopedias or dictionary, you can look up what you don't know.

  • I am having problems exporting my time lapses from quick time pro i need to save my files as photo jpegs but the standard video compression window will not open fully,

    i am having problems exporting my time lapses from quick time pro i need to save my files as photo jpegs but the standard video compression window will not open fully, it just keeps my mac (old 1.6Ghz 2.5 GB sdram G5 still good for most stuff i need) spinning for ever but i can see compression type H.264 selected and the other setting but i can not select any other options as it still thinking but never opens! why is this happening how do i get round it?
    my work flow is: 300 images shot on a 5d mark II medium jpegs opened in Light Room cropped to 16:9 then exported and opened in quick time i can save a .mov H264 giving me files sizes of 14 mb for a 16 second time lapse, mp4 9 mb. the only way i can get large files is saving as a self contained movie then i get 300mb files.
    i need to save my files 1920 x 1080 photo jpeg codec as i want HD quality.
    i am sure there is a simple way round this?
    thanks guys!

    It is very difficult to offer troubleshooting suggestions when the "os version" you are using is unknown as each os has their own troubleshooting solutions. 
    How large is your hard drive and how much hard drive space do you have left? 

  • (Bug report) When creating a new bookmark folder from the address bar right star drop down menu, sometimes a separate previously titled folder is automatically retitled to the new folder's name at the same time that the new folder is created.

    I had seen duplicate folders before, but only now just realized when they were being created (during the procedure I just described).

    A possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.com/kb/Bookmarks+not+saved#w_places-database-file

  • I need help! when I am importing my NEF files from my D3300 camera into lightroom 5 and try to use the "copy as DNG" button I always get an error message saying that "saying the file is not recognized by the raw format support"

    I need help! when I am importing my NEF Raw files from my D3300 camera into lightroom 5 and try to use the "copy as DNG" button I always get an error message saying that "saying the file is not recognized by the raw format support". The whole purpose of that button is so that the file can be recognized... How can I make the "copy as DNG" button work as it is supposed too?? Thank you

    Thank you for responding. So I essentially will never be able to use that button in lightroom 5? do I need to get LR 6? Will there ever be an update for LR 5 that will enable me to use it?
    Does DNG Converter work within LR or do I have to upload pictures to my computer and then make a second copy in DNG format. and then go into LR and use them?
    Thank you @dj_paige

  • When I try to export the file in word, I get the error "The Save as command has not been able to develop this document. Unable to create file"

    When I try to export the file in word, I get the error "The Save as command has not been able to develop this document. Unable to create file".
    Win7 Pro, 64bit
    Acrobat XI Pro, tryal

    Create a one word pdf file. Try converting to word. If that fails, try a complete uninstall, run the cleaner tool, then re-install.
    Download Adobe Reader and Acrobat Cleaner Tool - Adobe Labs

  • I am trying to find out how to assign files with particular extensions to the appropriate software. At the moment when I create a file using Word it is apparently given the extension .docx but Word doesn't recognise its own files. How do I alocate th

    I am trying to find out how to assign files with particular extensions to the appropriate software. At the moment when I create a file using Word it is apparently given the extension .docx but Word doesn't recognise its own files. How do I allocate the extension .docx to Word? There used to be a way of doing it, I think under "Preferences" but I can't seem to find it.

    Still in the same location:
    File > Get Info > Open with (select) > Change All (button)

  • I need to update specific records(of variable lengths) in a file. I can get the correct record but when I update it(add info), it overwrites part of the record following it. I am using labview 6.0

    I need to update specific records(of variable lengths) in a file. I can get the correct record but when I update it(add or change info), it overwrites part of the record following it. I am using labview 6.0. I need to be able to insert information into the middle of a file without disturbing the data before and after

    It's hard to give more specifics without more detail, but in general you're going to need to read in the entire file, split it into three pieces (everything before the record of interest, the record itself, and everything after the record of interest), modify the record, reassemble the three pieces in proper order, and write the whole thing back to the file.Of course if the file is very large you might not want to actually implement it this way, but conceptually at least, this is what you are looking at.If this file some sort of proprietary format?Mike...PS: this type of issue is why I really like databases...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Script to find files with same names with in a folder and it sub folders.

    Looking for script to find files with same names with in a folder and it sub folders.

    Are you just looking to find if any two files underneath a folder have the same name?
    If you just want to know that a file named "whatever" exists in two folders, that's not too difficult, but you probably want to know the full path names.
    Here's one attempt:
    $ perl -MFile::Find -le 'find(\&w, "."); while (($n,$p)=each %file) {if(@{$p}>1){print join(" ",@{$p})}} sub w{push @{$file{$_}},$File::Find::name;}'That will print the pathnames on the same line of any files with the same name that appear anywhere underneath your current directory.
    It's a bit long for a "one-liner", but functional.
    Darren

  • My numbers program created on my mac version 3.0 won't work on my ipad version 2.0. It says I have to save the file with preview option but there is no such option in preferences. Any thoughts?

    my spreadsheet created with numbers program version 3.0 created on my mac won't work on my ipad version 2.0. It says I have to save the file with preview option but there is no such option in preferences. Any thoughts?

    For the update to run Aperture must be installed in the system Application folder and named simply Aperture, not Aperture3.2.2 or anything else.
    I don't know if this would also affect photo stream but if your Aperture is misnamed or installed in an incorrect location fixing that to see if it clears up the problem would be a good first step.

Maybe you are looking for

  • How can I automatically load the most recent photo gallery?

    I would like to add a "Recent Photos" section to my home page. Is there any good way to do that?

  • ABAP proxy based on XSD with specific requirement for NAMESPACE

    Hi I'm using PI 7.11 My scenario is an ABAP proxy from SAP backend to filereceiver. NO mapping. The SI is based on an XSD from our customer, which have a targetnamespace, so a namespace requirement of six chars namely "SBSFL1:nnn". When sending the m

  • Full screen doesnt fill the screen in LighRoom 5

    Just moved to LR from Aperture and noted that to go to a Full screen image , push the F key .. Well al the panels disappear and the surround goes black , but not full screen, only the same size as the window previous.with black borders . Machine is a

  • Facebook video calling hacking

    i often use fb+skype video caling software...is it possble fr a third party to interfere without our knowledge or rather say hack the videos??

  • Just Upgraded to Logic Studio Pro

    Just upgraded Logic to its most current version. Logic Pro 8 is just wonderful. . . . I like the newer "GI". . . So far it's proven to be rock solid for me. . . And I appreciate the other software programs bundled with Logic Pro 8. The upgrade seem t