Repeat the action and save the file

Hello

I'm having a fever and is trying to accomplish something that seems very simple not knowing anything about scripting.

I made an action that applies to some simple effects (blur, threshold and high pass). I want to do is to repeat the action of n times and save an additional for each repetition png so I find myself with a sequence of files numbered from the action more applied (as in this example, Photoshop Cs5 filters Animation on Vimeo).

After som Googling, I ended up using AppleScript and was able to repeat the action for as many times as I want, but I'm completely stuck on the file save game. That's what I have right now:

Any help is greatly appreciated!

say application 'Adobe Photoshop CC 2015.5'

     set Starting point to current document

     set theFilePath to path of the file of current document

Repeat with n from 1 to 10

set myFile to theFilePath & ': output: image ' & { n channel } & ".png"

do "CrazyAction" of "Default Actions"

{ Save document in file myFile as PNG with options { }classPNG save options interwoven:fake} :

end Repeat

end say

In case someone comes up with the solution I also have another related question: How can I make sure that the output file names will have a padding of the number? Ideally, I'd end up with image2.png and so on, rather than image1.png image001.png, image002.png.

Thanks in advance!

One of the things you can do with javascript you can not do with applescript is to use the scriptlistener plugin. This plugin is put into the photoshop plug-ins folder, and when he's here (you don't want to leave it there all the time) it will record about everything you do, kind of like an action, but it generates the code in a file on your desktop. I used it for recording an action to save the png and running. The parts of the code are in the functions in the script. So I just created a folder name of base, a base file name and a counter of departure. The script will then execute your action and save a png image in this folder and change the name of the base by the counter file increases by one each time. You must put in the name of your action and the name of the action as defined in the script.

#target photoshop
var fileName = 'myFile-';
var folderPath = new Folder (Folder.desktop +'/action test/')//create whatever path you want here. Make sure the folder exists!
var doc = activeDocument;
var counter = 1//counter for changing the filename

for (var i=0;i<4;i++){//Change number 4 to whatever number you want it to repeat + 1
    runMyAction ("twirl", "Chuck");//put in action name and action set name. This line can be duplicated for different actions.
    savePNG ()
    counter++
    }

function runMyAction(myAction, myActionSet){
    var idPly = charIDToTypeID( "Ply " );
        var desc25 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref8 = new ActionReference();
            var idActn = charIDToTypeID( "Actn" );
            ref8.putName( idActn, myAction );//changed to a variable
            var idASet = charIDToTypeID( "ASet" );
            ref8.putName( idASet, myActionSet );//Changed to a variable
        desc25.putReference( idnull, ref8 );
    executeAction( idPly, desc25, DialogModes.NO );
    }

function savePNG(){
    var idsave = charIDToTypeID( "save" );
        var desc28 = new ActionDescriptor();
        var idAs = charIDToTypeID( "As  " );
            var desc29 = new ActionDescriptor();
            var idPGIT = charIDToTypeID( "PGIT" );
            var idPGIT = charIDToTypeID( "PGIT" );
            var idPGIN = charIDToTypeID( "PGIN" );
            desc29.putEnumerated( idPGIT, idPGIT, idPGIN );
            var idPNGf = charIDToTypeID( "PNGf" );
            var idPNGf = charIDToTypeID( "PNGf" );
            var idPGAd = charIDToTypeID( "PGAd" );
            desc29.putEnumerated( idPNGf, idPNGf, idPGAd );
            var idCmpr = charIDToTypeID( "Cmpr" );
            desc29.putInteger( idCmpr, 9 );
        var idPNGF = charIDToTypeID( "PNGF" );
        desc28.putObject( idAs, idPNGF, desc29 );
        var idIn = charIDToTypeID( "In  " );
        desc28.putPath( idIn, new File( folderPath + '/'+ fileName + counter+ ".png" ) );//set folder path and name
        var idDocI = charIDToTypeID( "DocI" );
        desc28.putInteger( idDocI, 200 );
        var idCpy = charIDToTypeID( "Cpy " );
        desc28.putBoolean( idCpy, true );
        var idsaveStage = stringIDToTypeID( "saveStage" );
        var idsaveStageType = stringIDToTypeID( "saveStageType" );
        var idsaveBegin = stringIDToTypeID( "saveBegin" );
        desc28.putEnumerated( idsaveStage, idsaveStageType, idsaveBegin );
    executeAction( idsave, desc28, DialogModes.NO );
    }

Tags: Photoshop

Similar Questions

  • Why Notes continue to repeat the files all the time

    Whenever I have start a new file in the Notes, he continues to repeat the file whenever I tap on a button

    Please, back up all data before proceeding.

    Check the accounts of the Internet or the preferences Panel Mail, Contacts and calendar to make sure that you do not synchronize Notes in more than one account.

    If you aren't the case, temporarily disable the synchronization of Notes. The notes will remain on the server and other devices, as appropriate.

    Leave Notes, if it is running.

    Triple-click anywhere in the line below on this page to select this option:

    ~/Library/Containers/com.apple.Notes

    Copy the line of text to the Clipboard by pressing Control-C key combination.

    In the Finder, select

    Go ▹ go to folder

    in the menu bar. Paste in the box that opens by pressing Command + V, then press return. A Finder window should open a selected folder. If this is the case, move the selected folder - not only its content - on the desktop.

    The folder you are moving is called 'com.apple.Notes', it is not the subfolder named 'Data' or anything else.

    ATTENTION: If you move all or part of the contents of the selected folder, but leave the folder itself, the application cannot start. Move the entire folder will be be rebuilt automatically.

    If you use OS X 10.11 ("El Capitan") or later, repeat with this line:

    ~/Library/Group Containers/group.com.apple.notes

    Re-enable synchronization of Notes.

    Notes to restart and test. If it works now, delete the files that you moved. Otherwise, leave again and put each backrest where she was, by crushing the that may have been created in its place.

  • How to download and save a file mp3 songs or movies

    How to download and save a file mp3 songs or movies

    Hello

    a lot of songs and movies have taken your ability to simply download the site now. If you want to search for the download of instructions on individual Web sites. (Amazon.com example) However, the best way to download is the right click on a pic/song/video/file and select Save.

    calculation of the happy,

    B Eddie

  • How I've spread my video into several parts and save each file under different names?

    How I've spread my video into several parts and save each file under different names?

    You are going to need a video editing package to do this, you can not cut just to the top of the video into segments at the file level.

    With an editor, you can then crop the video into segments

  • Can I convert an entire folder at a time or I need to convert and save each file in this folder one at a time and then download on my cloud to see my phone as well?

    Can I convert an entire folder at a time or I need to convert and save each file in this folder one at a time and then download on my cloud to see my phone as well?

    Hi kezleyp1982,

    You can convert files of different format in a folder as PDF by choosing "file > create > create multiple files"

    Once converted to PDF format, you can connect to "http://cloud.acrobat.com/" using your Adobe ID credentials and then download all the files to Document cloud at a time (press Ctrl + A to select).

    Hope that helps.

    Kind regards

    Ana Maria

  • I need a script to perform a specific action and save file with the SAME name of document .jpg

    I have all my PSD master files registered as follows: mydocument_PSD.psd. I want to run a custom action to sharpening and then save the file as mydocument.jpg (note the part "_PSD" should be removed).

    I found this Photoshop-export-PSD-script/Export - PSD.jsx to edwardloveall/Photoshop-export-PSD-script master · · GitHub that gets me close to there, but that's a png and is the name of the document to the right and there is no action ran.

    Any ideas?

    This gives a try...

    #target photoshop;   
    
    main();
    function main(){
    if(!documents.length) return;
    try{
        var path = activeDocument.path;
        }catch(e){
            alert("This document has not been saved");
            return;
            }
    if(activeDocument.name.toString().toLowerCase().search(/_psd\.psd$/) == -1){
        alert("Filename is not in the correct format");
        return;
        }
    var fileName = activeDocument.name.toString().match(/[^_]*/);
    var savedState = activeDocument.activeHistoryState;
    doAction("savelarge","Action Set");
    //////////////////////////////////////////////////////////////////////
    SaveJPEG(File(path + "/" + fileName + "_large.jpg"),10);
    activeDocument.activeHistoryState = savedState;
    savedState = activeDocument.activeHistoryState;
    doAction("savesmall","Action Set");
    //////////////////////////////////////////////////////////////////////
    SaveJPEG(File(path + "/" + fileName + "_small.jpg"),10);
    activeDocument.activeHistoryState = savedState;
    };
    function SaveJPEG(saveFile, jpegQuality){
    jpgSaveOptions = new JPEGSaveOptions();
    jpgSaveOptions.embedColorProfile = true;
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
    jpgSaveOptions.matte = MatteType.NONE;
    jpgSaveOptions.quality = jpegQuality;
    activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);
    };
    
  • How do I record an action and save under the new name of file - automatically?

    SO, I want to create a droplet that converts a batch of photos in b & W and records them in a different folder with the suffix "bw".

    Is this possible?

    Thank you

    I use the version 2.3.0 and you can get it from Russel Brown Scripts page Page of Scripts.

    By the way, you are probably trying to use the file > Scripts > Image Processor. Image Processor Pro will be available from the file > Automate menu and tools > Dr. Brown Services > Image Processor Pro in Adobe Bridge. Watch the video tutorial on the page that opens when you click the link above. Video and download link are available under: Adobe Photoshop CS5 panels & Actions/CS6/CC.

  • I have an Aspire 571 V3 that I thought that I was restoring the factory settings and save my files for

    Hi everyone, I hope that there is someone out there who can help me. I have an Aspire 571 V3 that I picked up at the factory settings, or so I thought. After all the files had been cleared and the system recovered it restarted and displayed a black screen with 'the installation program starts services' and a flashing light below are progressing. It has been that way for hours eight (8). is this normal or should I worry? In its current form, I have no control on the machine on the touch pad or mouse. I have provided with Currys computer recovery discs, but they are not to be recognized.

    Kalimera

    8 hours is a little too, you can try to stop it and repair the resumption of the process.

    do a long press on the power button to stop it

    at the next startup, press Alt + F10, and then check if you are able to start the Acer recovery process

    If it isn't

    Enter the BIOS by pressing F2 at startup

    enable F12 boot menu if not already enabled

    Save and exit

    put your first recovery disk on your laptop

    stop your laptop making the long press the power button / stop

    at the next startup, press F12, and then on the startup list select DVD/CD player

  • Access the Blob of Table data and save to file local system

    I have a table that has a blob column in which most of the regular file types are downloaded and stored.

    What is the best/better way to select/query this table and write all of the content of the BLOB in a local file system?

    Using oracle 10.2.

    Is it possible to sort the batch and save them on my local drive?

    Any help is appreciated.

    Thank you.

    Try to reset the l_pos to 1 for each iteration in your loop of file name:

    create or replace procedure save_to_file_third
    is
     l_file      utl_file.file_type;
     l_buffer    raw(32767);
     l_amount    binary_integer := 32767;
     l_pos       integer := 1;
     l_blob      blob;
     l_blob_len  integer;
     myfile_name varchar2(250);
    
     cursor c1 is
      select id from security where file_name1 is not null;
    
    begin
    
     for i in c1 loop
      -- Get LOB locator
      select file1, file_name1
        into l_blob, myfile_name
        from security
       where id = i.id;
    
      l_blob_len := dbms_lob.getlength(l_blob);
      l_pos      := 1;  --re-init l_pos var
      -- Open the destination file.
      l_file := utl_file.fopen('MY_FILES', myfile_name, 'wb', 32767);
    
      -- Read chunks of the BLOB and write them to the file
      -- until complete.
      while l_pos < l_blob_len
      loop
       dbms_lob.read(l_blob, l_amount, l_pos, l_buffer);
       utl_file.put_raw(l_file, l_buffer, true);
       l_pos := l_pos + l_amount;
      end loop;
    
      -- Close the file.
      utl_file.fclose(l_file);
    
     end loop;
    exception
     when others then
      -- Close the file if something goes wrong.
      if utl_file.is_open(l_file) then
       utl_file.fclose(l_file);
      end if;
      raise;
    end save_to_file_third;
    
  • Action to open and save multiple files in a different format

    Photoshop CS5

    TC 3

    I did not use its actions before.

    I want to open all files in a folder from one format and save them to a different format.

    How this is done?

    Thank you

    Rob

    Assuming that you all have a format and want to just open all the files and save them under a different format, without changing anything...

    A way, using Photoshop and measures and automation, would be to define an action that was simply a file - open and file - record under in a separate file.

    To set an action, in the ACTIONS Panel, create a new set and a new action, and then just save the steps on an existing file. Once this is done, click on the stop button.

    Once this simple action was defined, allows file - Automate - lot... configured to perform the action on the totality of a folder full of files.

    You probably want to use the options [] Override Action "Open" Commands and [of] Override Action "Save as" commands .  This option allows you to do things like specify the JPEG save quality in action and will not be prompted to do it every time.

    Your batch processing dialog box may look like this:

    -Christmas

  • wink/enter and save to file

    Hello

    I have a few questions about the recording of images to bmp(or jpg) or avi.

    I started using LabVIEW Machine Vision, so please understand if my questions are kind of ridiculous.

    I work with analog NI PXI 1409 and CCD monochrome camera capture card.

    Since the 1409 is fixed to the PXI chassis, I use Vision Acquisition Express vi to the level of RT (real time).

    Then, when I try to save a single image or images continuously to the file in my PC, it displays an error.

    I wonder if there is a way to save images to the file on my hard drive of the PC.

    When I put the path as C:\acquired image.bmp, no error has occurred and I think that the bmp file is saved on the computer of RT, not on my PC.

    So, I also wonder how I can access the directories of computer RT.

    Thank you much, long in advance.

    JY

    Since I was just a beginner, I'm looking for in the labVIEW Machine Vision and Image Processing manual of course.

    Hi Estelle G.,.

    I understand and I will try the method you suggested.

    Thank you very much.

    JY.

  • trying to repair xp and save existing files

    I'm trying to fix an installing xp on a desktop computer. I went by chkdsk from the recovery console and got the sign on screen, but the mouse no longer works.

    I just tried the xp installation option, accepted the user agreement, then 'R' to repair the existing installation of xp. He went through the process; delete and copy files. When the computer rebooted (I got the installation disk), he came to what looks like the window clean installation and requires the cd to put in to complete the installation.

    I tried to save the pic and the doc on the computer and I do not know I pressed "R" on the installation screen. I'm at a point of no return? Or is there anyway I can always save these files?

    * smile * you have not to * install * Ubuntu on the computer so that it can work - could just boot from the CD directly - the operating system runs as that without install on your hard drive.

    Glad that you got your stuff and everything sorted for the most part.

    Probably just use disk management to format the Ubuntu partition and use it for some sort of storage.  Is it of a significant size?

  • Cannot edit and save a file shared between 2 computers in a network after installing Windows6. 1-KB917607-x 64.msu.

    Original title:

    My husband has a computer that is running Windows XP with WinHlp32.exe.  I have a new computer with Windows 7 with 64 bit.  We are interconnected.  I could access its programs, edit files and save them to his system.  In particular, Overture 3.1 for musical notation.  Today, I need help in this program.  There was no help.  He told me to load Windows6. 1-KB917607-x 64.msu fix.  After it's download, I could access the help files.  The file was saved to my computer 32-bit of husbands and now he cannot open this file.  We must be able to modify each and other files and save to the original source.  Help, please!  If there is not a solution to this problem, can I reverse the installation of the said .msu file and live without help on 32-bit programs?  Told by people we bought the new machine that he would have no problems being networked with someone that is running Windows XP.

    Dizzy Daisy

    Hello

    The question is specific to this file, or occurs with all the files?

    Try these methods and check.

    Method 1:

    Do a system restore and check.

    System restore

    Method 2:

    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    Back up the registry

    a. click Start, type regedit and press enter.

    b. navigate to the following location.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WinHelp

    c. Add a DWORD value that is named AllowIntranetAccess to this subkey and set the value to 1.

    Reference:

    I can't open the help that was created in Windows Help format (WinHlp32.exe)

  • How to edit photos and save a file in 64-bit

    OS X Yosemite 10.10.5, iMac, 3.06 GHz. core 2 duo, 8 GB 1067 MHz DDR3, ATI Radeon HD 4670 256 MB. End of 2009 build

    Photoshop CS6 extended to 13.0.4

    "I checked 'About this Mac' is 64-bit.

    Check Photoshop "is 64 bits"

    Why can't edit photos and then save in 64-bit? 'MODE' selections show the 8, 16, 32 Bit. Now 32 bits went in the way of the DODO Bird all my plugins accept 16 or 64 32-bit not. Save my files under "Tiff files" or photoshop files

    I'm guessing that my graphics card may be the culprit. If so this can be improved?

    Personally, I'm computer illiterate, so I ask you to keep the simple answers please if possible.

    Hello

    Bad compared to the other forests.

    As you said that your mac is 64-bit, which is actually the CPU of the machine a structure bit of the architecture of the operating system.

    When you say that photoshop is 64 bits, which means that there is a 64-bit architecture, which will move into a single 64-bit machine it is what your MAC.

    Now, when you say on the image mode which has nothing to do with the architecture of the operating system or photoshop, it's the bits/channel information.

    And now photoshop can record up to a maximum of 32 bits/channel.

    So you don't have to worry about this.

    Your graphics card is not guilty.

    ~ Jitendra

  • How to edit and save a file (after change in CS6 in LR) to hold it in collection LR where it was?

    I understood that I could choose a file from a collection of LR, start editing in LR and then pass it to the CS6 (I chose the option to make a copy and keep your changes to the LR), modifies the CS6 and save CS6 (saved as a PSD file). Subsequently, I see the 2 files (one being the original file, the other the PSD file saved in CS6 in the original file folder, which is good) but the file seems to have disappeared from the LR collection. I'm new to LR.

    When you change in CS6, you do a 'Save' or ' save under... ". » ? You need to do a backup and not a "save under...". "You cannot change the file type from what it was when Lightroom created the file.

    Works for me when I do it like that.

Maybe you are looking for