Automation plugin as action and via File/Automate

Hi,
I have an Automation plugin that is scriptable (it has a number of exposed scriptable parameters and can be recorded and run from Actions palette). The plugin displayes the UI when it is called interactively (from File/Automate).
I am however having troubles distinguishing when it is called from an Action palette as a playback of recorded action and when it actually was called interactively from File/Automate (testing it in Photoshop CS6). On plugin invocation I check passed action descriptor and if not empty, read parameters from it and don't show the UI. On the call end, I write script parameters back to a descriptor to be able to use them in recorded action. With this in mind, after PS start first time selecting File/Automate works as expected - no descriptor/parameters passed into the plugin. But after a first call, Photoshop seems to keep the descriptor/parameters written at the end of the plugin and passes it on subsequent user invoked File/Automate. The same happens if plugin is getting called from a recorded action playback (and its expected). Basically after a first invocaction, the plugin will always receive action descriptor whether it called from an action playback or invoked by user.
I need to distinguish these two cases and basically present UI/start from scratch when user invokes it and use the passed action parameters when action plays it. I have not found anything in SDK to point me to the solution so I'd appreciate the help.
In filter plugins I can at least get selector start when invoked from UI and use that to free/ignore the action descriptor data.

I don't think you should care. The option you do care about is this one:
PIDialogPlayOptions playInfo
That is part of  PIActionParameters *actionParameters
That is part of your PSActionsPlugInMessage that comes into your automation plugin entrypoint.
This parameter has three options:
a) always display the dialog,
b) only display the dialog if you don't like the parameters you are given,
c) never display a dialog (either return an error or proceed with best options but don't stop with a dialog)
From the file menu, user selected, you should get option a (always). From the actions panel you should get option a or b. From scripting you can get all three options.
There is also a property in PIProperties.h called propPlayInProgress but the above information should be what you need to do the correct thing with dialogs.

Similar Messages

  • Where to I place downloaded .action and .app files

    Where do I place the automator action .action and .app files I download for installation. I noticed some load themselves auto into Automator whereas other need to be manually placed in a folder somewhere?
    Message was edited by: Todd Lichtenwalter1
    Message was edited by: Todd Lichtenwalter1

    For actions, you can use Automator to install them. There is an option in it's File menu for that.
    Apps saved with Automator are self contained and can be used from anywhere, as long as that meets the conditions you imposed on actions in the workflow itself. For example, if you set an action to depend on a specific location, then it would likely matter.

  • Photoshop Layout plugin with Canon IPF 6450- (File- Automate- ImagePrograf Layout plugin) for Canvas wrap in OSX9.4-Stop responding. Someone could Help? Thank-you.

    Photoshop Layout plugin with Canon IPF 6450- (File->Automate->ImagePrograf Layout plugin) for Canvas wrap in OSX9.4-Stop responding. Someone could Help? Thank-you.

    Hi blabla12345,
    (untested and without warranty)
    replace this line:
    const sSaveCUBE = "CUBE";
    with this:
    const sSaveCUBE = "cube";
    Have fun

  • I keep getting a "missing plugin" for midi and mp3 files.

    I keep getting a "missing plugin" for midi and mp3 files I want to listen to online.  These are Hymn files.  And I get a message telling me I have a missing plugin. Any ideas?

    My husband used to be able to convert ABC files to MIDI files .  This allows sheet music to be played on the computer so as to learn a tune.  We get the Missing Plug in  message.
    I downloaded the Quicktime 7.   I open Quick time, Still get the message.  What is the solution? 
    If you need to look at an example, go to "The Session" website:
    http://thesession.org/tunes/2265
    Thank you,
    Mary

  • Synchronizing several audio and video files automatically in premiere?

    Hi there!
    I'm working on a short film shot on the Arri Alexa, and all my audio is on seperate audiofiles, though synced through time code. So I'm wondering: In Premiere CC, is there a way to automatically synchronize several audio- and video files, using timecode (as you can in Avid), without having to merge them individaully? THis would save me a lot of time.

    You can try using the "create multicamera sequence" command. That will create "multiclips" of your footage with its related audio. It can sync with timecode or use the audio for synchronization. When you need to export the edit for color grading, you can select all of them and choose multicamera>flatten. But beware that if you apply effects, such as speed ramp or intrinsic effects, those will be removed on a "flatten" command.

  • Import and Copy files automatically

    Several years back I lost several photos using iPhoto because while it imported the image, the files copied into the iPhoto library were corrupted during the import process. To prevent that from happening to me again I wrote an applescript that would ask for a name of the roll (or event) then import the photos into iPhoto and then create and copy the photos into a folder of the same name on a backup drive. I now had two independent copies of the image in case one copy process went bad.
    Now on Aperture, I am looking for a plugin that does the same thing for Aperture as the script I wrote for iPhoto. Although I am fairly certain I came across the plugin before, I can't find it now.
    Any help in locating it or any other ideas would be appreciated.

    Hi Vadim,
    Thanks, isn't %SELECTION% passed to the process chain?  I see that the process chain RUN LOGIC contains a field SELECTION.  If the value is passed, then I have to change that too?
    2) If we change the value to SELECTION2, then how does this variable capture the parameters for the dimensions?  I am commenting out the prompt of the copy opening script keeping the first prompt below from the import from BW in order to capture the parameters for both scripts.
    PROMPT(INFOPROVIDERSELECTION,%InforProvide%,%SELECTION%,"Please select the InfoProvider
    and set selection (InfoProvider list is restricted by both
    BW and BPC authority)",,)
    Thanks
    Eyal

  • Automating using Photoshop Actions & Excel document??

    Hi - I'm new to automator and I wanted to know if it was possible to have automator run photoshop actions and also pull info from an excel document. Here is ideally what I’d like to do:
    I receive hundreds of images (book covers & interiors) that I’d like to resize and rename automatically when they are Dropped into a folder.
    There are 3 different resizes that I’d like to be done. I have the resizing actions in photoshop already. I run the automate>batch command in photoshop, but I’d still like to make it simpler.
    Original files – These are how I receive the files and I clean them up to look like this.
    - COVERS – i.e. 140394877213_ccvr.tif
    - SPREADS – i.e. 140394877213_csp1.tif, 140394877213_csp2.tif, etc.
    Here are the different folders
    Folder 1(sized for catalog use) – action set up in photoshop cs2 that will size covers, another action to size spreads at a different size.
    - covers – bookname.tif
    - spreads – 140394877213_csp1.tif
    Folder 2 (smallest sized cover) – action in photoshop to resize cover
    - covers – 140394877213.tif
    Folder 3(sized for powerpoint presentation) – action in photoshop that will resize covers to a certain size, and a separate action that will size spreads to another size.
    - covers – bookname.tif
    - spreads – bookname_csp1.tif, etc.
    5 photoshop actions in total
    When the original files are dropped into the specified folders (folder 1, folder 2, folder 3), a photoshop action is run that resizes all the files in the folder and also renames the files.
    Can I do this? I have all the books and isbns in an excel document that I’d like automator or applescript to pull the information from the excel doc to rename the files accordingly.
    Also, is there a way to record the names of the files I receive in an excel document?
    Or even better, after the images are placed in the folder, can a script check the excel document (that has the listing of the booknames and isbns) and mark off which files where received and placed in the folder. I hope that was clear.
    Any help or advice would be much appreciated!
    MacBook   Mac OS X (10.4.8)  

    ngb111,
    I know this is possible through AppleScript as I just finished off a script that renames files based on an Excel list.
    http://discussions.apple.com/thread.jspa?threadID=871047&tstart=0
    It might be also be possible using Automator through some third-party Automator actions.
    http://www.hanaan.com/Automatorbookonline/Automator%20Actions%20Download.html

  • Manually Adding and Deleting Files in iTunes

    Hello Folks
    Got a few simple questions:
    I'd like to manually add sound files to my iTunes Library
    (preferences - yes but where exactly)
    I'd like to also 'DELETE' some sound files that were stored in the Library
    (preferences - yes but where exactly)
    And do you guys have any other sound file player that will open tunes and sound files automatically INSTEAD of iTunes?
    Perhaps WinnAmp Free Player?
    Or is there another one that you recommend?
    Thank you
    Mike

    OK, maybe I am duplicating your problem. When I do a Spotlight search on the song's filename without the extension, I get a list of files. The track I added to iTunes is still in the appropriate folder and it looks like iTunes copied the file I wanted deleted to the trash instead of moving it. Additionally, the first file was named "bell.wav". I copied it to the desktop, changed a tag in the original file, and then imported the copy. iTunes named the copy "bell.wav.wav". I then deleted the song from iTunes, or thought I did, and what showed up in the trash was a file named "Bell.wav.wav.wav". I emptied the trash and "bell.wav.wav.wav" disappeared from the Spotlight list, but "bell.wav.wav" did not.
    I repeated the above using an mp3 file and exactly the same things occurred, except that iTunes did not add a new extension to each iteration of the file (they were all called "test.mp3" rather than "test.mp3", "test.mp3.mp3" and "test.mp3.mp3.mp3").
    I had never noticed this behavior before and I will look into it some more. I have recently imported some cds to manually put on my iPod, after which I deleted them from iTunes, so I have plenty of deleted file names to look for.

  • Recording Actions and Batch Automation Issues

    I'm not getting proper results when performing a batch automation on several images.
    I've recorded an action performing several image modifications, these modifications are:
    1. I've set the Background layer and named it L1
    2.I resized the image from 1600X1200 to 150X113
    3. I resized canvas size to 150X150
    4. I duplicated layer L1 and named it MIRROR
    5. I Transformed "MIRROR" layer by flipping it vertically
    6. I moved the "MIRROR" layer down until I obtain the proper mirror effect
    7. I saved the image as jpeg
    8. I stoped recording
    Now when I tryied doing:
    Open several images of size 1600X1200/File/Automate/Batch
    with the following settings:
    -source: open files
    -destination: folder (i chose a folder)
    -Override action "Save as Commands" checked
    The images were resized properly, the canvas size was correct layer was duplicated, and flipped vertically but MIRROR layer was not moved enough so I didn't get a perfect mirror effect.
    There must be something wrong with the way I move my MIRROR layer when I record the action? Is there a way of moving an image by a number of pixels instead of using the keyboard arrows?
    Thanks for any help

    So it worked:
    But now I have another challenging question.
    How can i apply a gradient effect and have it recorded and apllied as automate/ batch to several images?
    The effect I'm trying to obtain is this:
    steps I recorded are:
    1. Created a new layer and called it "background"
    2. I applied a gradient to "background" dragging the cursor from to to bottom and from middle to bottom again
    3. I arranged my layers so I can see the "mirror" layer
    4. I added a mask to the layer
    5. I applied gradient on the layer dragging the cursor from middle of image to bottom.
    I recorded the whole thing
    It works on the original image in automate batch processing but for other images I get a white background or no change on the mirror layer???

  • Automator Action "Import Audio Files" error message

    I use this automator action daily when it is activated via an alarm time in iCal. It is the 3rd workflow run in a series of 7 worlflows to create audio files while I'm at work (I record XM programming for use later on my iPod). Since I upgraded to OSX Lion yesterday, I'm getting a new error message I've never seen and I can't find any info on it. Can anyone help? The error message in a popup dialogue box is:
    The action “Import Audio Files” encountered an error.
    Check the actionʼs properties and try running the workflow again.
    Under the Log for the workflow I get this message:
    The operation couldn't be completed. (OSStatus error -1712.) (-1712)
    The imported audio file does actually get inputted into iTunes and converted properly via iTunes, but the error creates two problems. One is the source file isn't deleted after the action runs (which is a checkbox option in that particular action). This isn't a big deal, because I can create another workflow seperately to delete the file, so I'm not as concerned with that. The major problem is that the error dialoge box displays and the sebsequent workflows that are scheduled to run right after this one can't run becasue Automator is occupied with the error message.
    I'm looking for any advice I can find, I've been using this series of workflows for a long time without issue, but seems like everytime there is a new OS I have to go through the geriatrics of figuring out what slight changes apple made to the Automator actions.
    Thanks for reading,
    Chris

    Hi,
    I just solved the problem pretty easily: earlier, on Snow Leopard, automator had to be set to work in 32bit instead of 64bit otherwise there has been a lot of error messages. 
    I tried to do the same with iTunes on Lion and, oh miracle, it works:
    close iTunes then go to Applications -> right click on iTunes -> read informations -> check the box to run the app in 32bits and restart iTunes and .... that's it.
    I work in a local radio in Belgium and I rely on automator on an everyday basis to download then add prerecorded broadcasts to iTunes to be aired with Lion server and I was stuck since a few weeks because of that problem. Now I can finally work again :-)
    English is not my native language so please forgive me for my mistakes ... :-)
    Apple RULES (but you already know that )

  • Unable to capture startup and shutdown event of Photoshop in automation Plugin.

    Hi,
    I am creating an automation plugin and I want to register some events. I have seen listener plugin sample to register event in startup and unregister event in shutdown. I have used same code in my plugin but I am unable to capture the startup nad shutdown event of Photoshop. On clicking the menu item of my plugin the calls come inside the AutoPluginMain but during the startup or shutdown of plugin, the calls does not come inside the AutoPluginMain.
    I am unable to detect the cause of the problem. Can someone please giude me??
    Thanks in advance.

    Hi Tom,
    Thanks for the suggestion.
    Yes, I am working on Windows. As you suggested, I compiled .rc file but the compile option for .r file was disabled. After compiling the .rc file, I again rebuild the complete project and tested my build. But still I was not able to achive the desired result.
    Any other thing that I need to do to make it work?
    Thanks

  • Automator not working properly while setting comments and moving files to folders, how to proceed?

    So, this is my workflow, i've converted it into a folder action and applied it to a folder called "Automator" in my desktop:
    i've turned "show this action when the workflow runs" so I can see what is going wrong
    here's what I get (each action happens to have a problem to it)
    1) Get specified finder items
    2/3) Filter / find finder items
    those are there just to work for this simple porpouse: identify that i've dropped a pdf file in the "Automator" folder
    I move the PDF
    The workflows starts
    4) Ask for a text
    this would be a prompt for me to add a comment to go to the "Spotlight Comment" section when I click on "get info"
    put instead I get this...
    that's the directiory that the file is in!
    so I type some random text that would go to the spotlight comment section
    then click OK
    5) Set Spotlight Comments for Finder Items
    that's the actual action, it should have the text that i've inputted in the last step, but instead it has this:
    (Text is the variable that i've setted up to be shown on the ask for text and set spotlight comment...)
    so, I have to manually input the comments I want to be on the file
    and click continue
    6) Label Finder Items
    That's the action where i'm suppose to choose the label color, so I do that and click continue
    this should work, but the file doesn't change label at all
    nothing happens.
    7) Move Finder Items
    It should move to the "untitled folder", but again, it doesn't.
    and that's it.
    It's a PDF file, but it's not recognized by the system as a PDF.
    When it is recognized, if I move more than one PDF file, the workflow works for just one PDF, instead of working for all of them!
    I would reeeeally appreciate any help
    the whole point in this was for me not to buy Hazel, but I think I will end up buying it :/
    thanks for any help anyone can give me!

    hey red_menace, thanks veeeery much for your support, I really appreciate it
    as you can notice, i'm new to the automator, i'm actually new to the whole software thing, I have no idea what I'm doing so I really appreciated your help, changed my life and made my day
    BUT, it didn't work...
    well, it did, partially
    I still don't get any comments on the "Spotlight comments" area and when I convert the workflow to a folder action, it does not recognize the file!
    here's my workflow:
    here's what I did, step by step:
    first I added find finder's items, that worked really well, but it labeled all the finders files that were in the folder AND subfolders (the ones that were suppose to already be labeled right)
    then I removed the find finder's items and tried, worked well, but I hadn't checked the "ignore the input", so the comments weren't working
    so then I ignored the input on the actions that didn't require an iput, so my workflow is the same as yours now… and It's not working.
    at first it worked for only 1 pdf, but no comments
    then it worked for 50% of the pdfs, with comments
    then it stopped working at all.
    added the find finders items
    worked while testing with one
    saved
    tried with 7 at the same time
    worked… but didn't get any spotlight comments
    went back on automator
    checked "show this action when the workflow runs" for the spotlight comments action
    added the variable as an answer on the "ask for text"
    the variable ran as expected, I had the same input I've inputed as an answer for the "ask for text" on the "spotlight comments" action, label went okay and stuff, but i did not get any spotlight comment on the spotlight comment section!!
    went back on automator and checked out the "append to existing comments" on "set spotlight comments for finder items"
    and still didn't get any comments on the files!
    btw, I went back on the automator and removed the find finder items
    then tried again with only one file, dropping it in the application. it worked, but I still didn't get any spotlight comments!!
    I also tried deleting the ask for text and tried just
    but it did not work
    I also converted the workflow that working for all expect the comments to a folder action, and it DID NOT recognize the pdf I dropped in the folder, what do I do?!

  • Lightroom Export Action and Automator

    Hi. Have an interesting anamoly that I hope someone an explain to me. I am trying to leverage Adobe Lightroom's export preset post-processing option to help in importing photos into iPhoto (where I can make easy use of the .mac photocasts). I created an Automator workflow comprised of the following actions: 1) Get Specified Finder items (with the export folder from Lightroom selected) 2) Get Folder Contents 3) Import Photos into iPhoto (with the delete source option selected).
    I placed the Automator app, named "Import to iPhoto" into the Lightroom "Export Actions" folder and selected it in the post-processing drop down in my export preset. When exporting from this preset, the file(s) are exported as expected, however, for some reason the Automator action imports duplicate files into iPhoto for each photo exported. If the photos are exported separately without the post-processing export action, and then the Automator action is run manually, there are no duplicate files imported. Does anybody have any ideas what might be occuring here?
    G5 DP2GHZ, PB G4 12   Mac OS X (10.4.8)  

    Bump, Anybody??

  • Automator: Create new folders from .csv file and put images inside.

    I have a challenging Automator task to achieve. I need to
    1) create a set of folders labeled with the contents in column A of a csv file. (example: column A1 JoeBrown A2 SuzyBrown A3 JimBrown etc..) resulting in
    3 folders titled JoeBrown, SuzyBrown, and JimBrown
    2) take the image represented by an image number in column B of the same csv file and move that file into the folder that was created (example: A1 JoeBrown gets a folder created by the name JoBrown and column B IMG_1234.jpg is physically moved from within the same folder as the .csv file into the folder created by column A.
    Both the csv and img files would be in the same folder. I have the script to create a set of folders from a csv list just can't complete the moving of files based on the contents of column B.
    SUMMARY: I have a folder containing several images img_0001, img_0002, img_0003 etc. and a csv file that contains columnA a series of names and column B a series of jpg image numbers. I need to have a script that will create folders labeled whatever name is in column A (see the script below. it works great!) then move the images from column B to the folders generated from column A.
    The csv script is:
    tell application "Finder"
      set mgFolder to container of mgCSVfile as string
      repeat with x from 1 to count paragraphs of mgList
        set text item delimiters of AppleScript to ","
        set mgThisList to text items of paragraph x of mgList as list
        set text item delimiters of AppleScript to ""
        set mgTopFolder to item 1 of mgThisList
        if (exists folder mgTopFolder of folder mgFolder) is false then
          make new folder at mgFolder with properties {name:mgTopFolder}
        end if
        set mgNewFolder to (folder mgTopFolder of folder mgFolder) as alias
        repeat with i from 2 to count mgThisList
          if item i of mgThisList is not "" then
            set mgSubFolder to item i of mgThisList
            if (exists folder mgSubFolder of folder mgNewFolder) is false then
              make new folder at mgNewFolder with properties {name:mgSubFolder}
            end if
          end if
        end repeat
      end repeat
    end tell
    Thanks for any help that may come my way.

    This should work
    (assumes a true "," seperated file with only two items per line, i.e.: Test,Test.jpg):
    The Run Shell Script Action is:
    cd "${1%/*}"
    while read line         
    do         
         FolderName=${line%,*}
         ImageName=${line#*,}
         mkdir "$FolderName"
         mv "$ImageName" "$FolderName"
    done < "$1"

  • WMP and VOB files via web site

    I have created a web page that will list cover images all of my backed up DVD's that I have on an external hard drive and each cover images is linked to the first VTS_01_1.VOB file for that DVD.
    I am testing the page to see how it works for each device I have.  The page works flawlessly with my Samsung tablet, the player I have installed on the tablet will automatically go from VTS_01_1.VOB to VTS_01_2.VOB and so on until movie is
    done.
    If I use my Windows 7 pc & IE 8, WMP will open and play the VTS_01_1.VOB and stop at the end of that file, how can I get WMP to continue to the next file automatically?
    I have also tried placed the file VIDEO_TS.IFO & VTS_01_0.IFO in the link and then my tablet will not play it and WMP will not open and play it also.  When I use this link in IE I will get a dialogue box asking if I want to save or
    open, I select open and WMP will open and then give me a message "The selected file has an extension (.IFO) that is not recognized by Windows Media Player, but the Player may still be able to play it. Because the........  Do you want the Player to
    try to play this Content? YES / NO. 
    I select YES and then I get a dialogue box "WMP cannot play the file.  The player might not support the file type or might not support the codec that was used to compress the file.
    So why will WMP work if I double click the file on the pc directly in the folder and not via the web page?

    WMP access files present in a particular folder, the order in which the IFO file or linked VOB file is desinged. However, when it comes to webpage, WMP treats the location as remote and hence will not proceed to next file automatically, even if linked in
    the IFO file. This is a security feature to avoid any execution of code from unknown source.
    I can suggest adding the VOB file in a playlist, like ASX file, and that file will be opened by WMP and navigation between different VOB files is possible.
    Balaji Kundalam

Maybe you are looking for

  • .mov file saved from other Mac not working on new Macbook

    My old Macbook Pro started acting funny so I saved all my pictures and videos to USB drives. My new Macbook (OSX 10.5.8) with QuickTime (version 7.6.4) will not open the .mov files. Per another similar thread it was suggested to enable the "Show lega

  • ABAP Dump while using "Upload from clipboard"

    Hi, We are facing ABAP dump when using "upload from clipboard" funciton without any data on the clipboard. "Upload data" is working fine if some data exists on the clipboard. If in case of no data on the clipboard, it is leading to an ABAP dump. Appr

  • Can I create a submenu in a movie with chapters?

    I have a 1 hour instructional movie with 9 chapters. I want to add dozens of submenus. I know how to go back to FCE and make chapters, but how do I make dozens of sub menus from within idvd?? imac   Mac OS X (10.4.9)  

  • Red CIrcle X becaue the printer does not exist

    I have been getting the "print - RED CIRCLE X" because the requested printer does not exist" since I installed CS5 when it first came out. I am using Windows VISTA Home Premium, Service Pack 2 - Photoshop CS5, 12.0.4 64 bit. My computer is an i-7, 92

  • Runtime error while posting goods in MB1C

    Hi,gurus When in MB1C i am trying to post goods.While saving i got message 49 number ranges should be defined.I done it clear in FBN1.So when i am saving posting goods i am getting runtime dump error.So how can i solve this problem Regards, Suresh