Conditional Actions Script for PS CS2

This script from Sivaratnam Gunaratnam will perform actions on Photoshop files and can change depending on certain definable conditions encountered in each file.
From his Blog entry:
"This is a tool I scripted for myself that I would like to share with all fellow Photoshopers. It allows you to execute your Actions based on Conditions. No programming needed. Just click and define your conditions.. Some examples of conditions are as follows:
If the image height is greater than its width, do Action X, or else do else Y
If the image format is JPG / PSD / BMP do action...
If the image file size is bigger than 300KB, do action....
if the image IS/IS NOT of RGB, CMYK... etc
if image author is Siva, do action...
if image exif contains Nikon D70s, do action ....
if image name contains "paris", do action...
etc
etc
Please note thatas of this writinghe has only tested it on Windows and PSCS2. However, someone posted a comment to his blog entry stating that it "Seems to work perfectly on a Mac too."
caveat downloador :)
Visit Siva's blog to read more and get the script at the following link:
http://actionlogic.blogspot.com/2006/03/sivas-photoshop-conditional-action.html

This script from Sivaratnam Gunaratnam will perform actions on Photoshop files and can change depending on certain definable conditions encountered in each file.
From his Blog entry:
"This is a tool I scripted for myself that I would like to share with all fellow Photoshopers. It allows you to execute your Actions based on Conditions. No programming needed. Just click and define your conditions.. Some examples of conditions are as follows:
If the image height is greater than its width, do Action X, or else do else Y
If the image format is JPG / PSD / BMP do action...
If the image file size is bigger than 300KB, do action....
if the image IS/IS NOT of RGB, CMYK... etc
if image author is Siva, do action...
if image exif contains Nikon D70s, do action ....
if image name contains "paris", do action...
etc
etc
Please note thatas of this writinghe has only tested it on Windows and PSCS2. However, someone posted a comment to his blog entry stating that it "Seems to work perfectly on a Mac too."
caveat downloador :)
Visit Siva's blog to read more and get the script at the following link:
http://actionlogic.blogspot.com/2006/03/sivas-photoshop-conditional-action.html

Similar Messages

  • After action script for Solaris

    Hi,
    I'm having trouble with an after action script for the solaris box.
    my script reads..
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
    <Waveset>
    <ResourceAction name='after-create'>
    <ResTypeAction restype='Solaris' timeout='60000'>
    <act>
    #!/bin/ksh
    echo "$WSUSER_accountId says Hello World!"
    PATH=/usr/lib/nis:$PATH; export PATH
    nisaddcred -p [email protected] -P keerthi2.example.com. des
    exit 0
    </act>
    </ResTypeAction>
    </ResourceAction>
    </Waveset>
    I have edited the tabbed user form to include the following field:
    <Field name='global.create after action'>
    <Expansion>
    <s>after-create</s>
    </Expansion>
    </Field>
    Now when i am trying to create a user in my IDM n assigning the Solaris resource i'm getting the following error..
    com.waveset.util.WavesetException: An error occurred adding user 'client1' to resource 'Solaris Client'. com.waveset.util.WavesetException: Script failed waiting for "_,)#+(:" in response "" com.waveset.util.WavesetException: Script processor timed out with nothing to read and the following unprocessed text: "".
    the account is created in IDM.
    please help me out!
    Regards
    Sanjeev

    Hi-
    Did you ever get a resolution to this issue? I am seeing the exact same error in IDM 8.0 patch 3
    Error
    com.waveset.util.WavesetException: An error occurred adding user 'testusr15' to resource 'idm_client'. com.waveset.util.WavesetException: Script failed waiting for "$" in response "_,)#+(:" com.waveset.util.WavesetException: Script processor timed out with nothing to read and the following unprocessed text: "_,)#+(:".
    My action script looks like this:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
    <Waveset>
    <ResourceAction name='after-create-nppasswd'>
    <ResTypeAction restype='Solaris'>
    <act>
    #!/bin/sh
    touch /tmp/idmtest
    release=`uname -r`
    if [ $release != "5.10" ]; then
         passwd -l $WSUSER_accountId
         sed "s/$WSUSER_accountId:\*LK\*/$WSUSER_accountId:NP/" /etc/shadow > /etc/shadow.new
         mv /etc/shadow.new /etc/shadow
    else
         passwd -N $WSUSER_accountId
    fi
    exit 0
    </act>
    </ResTypeAction>
    </ResourceAction>
    </Waveset>

  • Conditional action script not executing

    I have four buttons, Q1, Q2,Q3,Q4.  the script for each works fine:  the variable (ex. Q1) is set equal to 1 and the other functions perform as scripted.  When all four buttons are clicked on and equal to 1, another script (Slide_End) is supposed to work--hiding a box on the screen and showing the Next button.  This Slide_End script is not working.  I have the slide properties On Enter assigned to Advanced Actions>Slide_End.  The Slide_End script has been labelled as All Clicked within the script itself.  I just can't understand what I am missing.  I have the exact same settings on another slide and it works fine.

    Never had a formal training neither, but have been blogging about advanced actions and solving use cases for many users. And wrote some articles long time ago, here you can find the link with those:
    https://workspaces.acrobat.com/?d=tGgSjfVqRtEgI6fORG-zbw
    Normally for a standard action, you choose 'Standard action', not a 'Conditional action'. Have a look at this old presentation, maybe it will clarify something:
    http://blog.lilybiri.com/presentation-devlearn-2011
    Double click on the second 'Untitled' and you have a second possibility to check something. The first condition will always be fulfilled  (IF 1 is equal to 1) so that is really a standard action. The second Untitled will be your real condition where you check all the variables and have two different sets of statement/commands depending on the answer Yes or No for that condition.
    Lilybiri

  • Is Action Script for netStreaming and FLVPlayback component radically different, not interchangeabl?

    Hi.
    I am using NetConnection and NetStream to play back flv in Flash Pro CS5.5, and trying to add cue point to trigger events using Action Script, and to automatically rewind to the start at the end. There is no problem to trigger events via AS when the cue points are embedded, but i am unable to add cue points using AS.
    When i use an FLVPlayback component, there is no problem to add cue points (http://help.adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d1 18a9c65586-7feb.html) and to loop the playback using autoRewind (and fl.video.VideoEvent.AUTO_REWOUND which i got from Nafem at http://forums.adobe.com/thread/857036).
    However, i am failing to use this same code w/a netConnection and netStream, and would appreciate any help.
    thanks.

    Hello,
    Well, I've got some help from another helpful fellow at macscripter.net and I have a working script - albeit a bit more specific (ie, hardcoded extensions to look for) and a different approach.
    Here's the script:
    on adding folder items to thisFolder after receiving addedItems
    repeat with movieFile in addedItems
    set {Nm, Ex} to getName_andExtension(movieFile)
    set movieFilePath to (thisFolder as text) & Nm & ".avi"
    set subtitleFile to (thisFolder as text) & Nm & ".srt"
    if Ex is ".srt" then
    try
    tell application "iFlicks"
    import (movieFilePath as alias) with gui
    end tell
    end try
    else if Ex is ".avi" then
    if my FinderItemExists(subtitleFile) then
    try
    tell application "iFlicks"
    import (movieFilePath as alias) with gui
    end tell
    end try
    end if
    end if
    end repeat
    end adding folder items to
    on getName_andExtension(F)
    set F to F as Unicode text
    set {name:Nm, name extension:Ex} to info for file F without size
    if Ex is missing value then set Ex to ""
    if Ex is not "" then
    set Nm to text 1 thru ((count Nm) - (count Ex) - 1) of Nm
    set Ex to "." & Ex
    end if
    return {Nm, Ex}
    end getName_andExtension
    on FinderItemExists(thePath)
    try
    set thePath to thePath as alias
    on error
    return false
    end try
    return true
    end FinderItemExists

  • I need an action/script for image resizing with a "special" attribute

    Having a headache, nothing work so far the way I want it...
    So here's the deal: I have a bunch of psd files and I need them saved as jpegs in a fixed size - 450x590px.
    The filename of the jpeg should be the same as each psd and the images should be resized proportionate.
    The psds have irregular sizes, some are tall, some are square, some are wide, etc.
    I tried using the place function on a template, but that requires my input - choose what to place, then type the filename.
    Any ideas?
    Thank you for your input!

    elmoldovano wrote:
    So here's the deal: I have a bunch of psd files and I need them saved as jpegs in a fixed size - 450x590px.
    The filename of the jpeg should be the same as each psd and the images should be resized proportionate.
    The psds have irregular sizes, some are tall, some are square, some are wide, etc.
    I tried using the place function on a template, but that requires my input - choose what to place, then type the filename.
    So have both Portrait and Landscape images with varying size. and want to create jpeg from them that are 450x590 pixels in size.  Can the have Portrait and Landscape orientations.  If they all must be Portraits 450px wide by 590px high  your landscape images composition will not fair well.  For cropping landscape image to portraits image normally crops away  to much image content.   Content aware scale may work somewhat better then cropping to portrait the introduced distortion may be acceptable.
    If Portrait 450x590px and Landscape 590x450px is an acceptable solution.  I would go with a cropping solution for there will be no distortion and centered crop composition are usually acceptable.   It can also be done with a two step action used by an image processor script.  If you download my crafting action package. It has a plug-in script that can be recorded in an action to set a 45:59 centered aspect ratio selection which you follow with an Image Crop step.  You run the Image Processor  script have the action make the crop and the Image processor to resize the crop to fit into a 590x590px area.
    Crafting Actions Package UPDATED Aug 14, 2012 Changed AspectRatioSelection Plug-in script added Path support.
    Contains
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action
    Sample Actions.txt Photoshop CraftedActions set saved as a text file.
    12 Scripts for actions
    Example
    Download

  • What is the action script for "go to next page"?

    I'm new to flash and need help with action scripts.  What is the code for "go to next page"  I'll be using a mouse event.
    Thanks!

    It depends on where the next page is.

  • Action Scripting for button

    I created a little 'movie clip' of a continuous animation and
    want to make it a button that can be used in dreamweaver. I was
    told I would have to link it from flash (as dreamweave can not link
    a swf file to a webpage). I was having a problem trying to action
    script the movie clip - when I selected the 'movie clip' graphic it
    said: Current selection can not have actions applied to it. How
    should this be done?
    Thanks

    you're right - that should work. my first thing that i test
    when something like that happens is that every keyframe in the
    tween contains exactly the same instance. A common problem is that
    the instance name of the clip may be slightly different(eg a space
    somewhere) in different keyframes.
    Rather than looking for the problem, I usually just clear the
    keyframes in the tween and then put them back in. In your case I
    cleared the keyframe on frame 12 on layer "see more" and then
    inserted keyframe(returning it to color: None) and tested the
    movie. The button works fine!
    So then i went back to your original movie to try to find
    what was inconsistent between the two keyframes in 'see more' and
    couldn't find the problem... so anyway, this looks like a situation
    where we may not know the reason for the problem but at least we've
    found the solution...

  • Action script for batch-opening psd layer files flat? (alt+shift?)

    hi
    i am daily batch processing with an action script to make flat tiffs from psd layer files, like 10-100 files every couple of days in my workflow.
    until now i could not fine a solution to begin the batch processing-action with opening layer files FLAT.
    the reason is: i am working with huge files, 5-20GB .psb files, (16bit, ECI-RGB, 50x100cm, 300dpi) and it takes a couple of seconds to open with my pcie-SSD.
    that multiplies the time it takes to open 50 of such files. i would gain a lot of time, if photoshop cs6 would not open it with layers, but flat.
    there is a workaround i am using daily: (osx) hold alt+shift, then click on the layer file in the finder and cs6 opens it flat.
    but that did not work in the action script. it doesnt store the keyboard command alt+shift.
    any idea how i could save time and use the alt+shift command in the action script or any other solution please?
    thanks
    peter

    I just tried to record this using ScriptListener, and it didn't record it either.  No indo in the ExtendScript SDK on this either.  I don't think that this is possible at this time.  Maybe someone who know more than I do can find a way.

  • Projector's "Full Screen" viewing action script for Flash Cs5.5

    How do I set a Projector to "Full Screen" viewing on Flash Cs5.5
    Knowing that it already has action script.
    I have tried to add FSCommands on top, to no avail.

    stage.displayState="fullScreen";

  • Create an automatic action script for 3d rotate effect

    Is it possible to create an action script that automatically applyes the 3d rotate effect with specific settings?
    An example would be when I press F2 it rotates the object instantly with my specific settings without ever having to press anything else.

    ok.
    draw yourself a shape, whatever you like. Go to Effect > 3D > Rotate and apply the settings you want.
    with your object selected, go to the Graphic Styles palette (Window > Graphic styles) and create new graphic style (either in the palette menu or the little button). Call it something memorable.
    draw a new object, again whatever you like. open the Actions palette (Window > Actions). Create new action. Give it a name and assign it to a Function key, then click OK (The action will start recording).
    Select your new object, then pick your new Graphic Style from the graphic styles palette. it should apply your 3D settings to the new object.
    click on the stop button at the bottom of the Actions palette.
    create new object, select it, hit your chosen function key. enjoy.

  • Specific action script for url retrieval

    I use Clickabilty's cmPublish for ad serving.  When creating Flash ads, it requests the following action scipt for clickthrough info:
         on (release) {
                    if (clickTAG.substring(0, 4) == "http") {
                     getURL (clickTAG, "_blank");
    Do I need to replace the clickTag info with the url?  What about the substring.  (I am new at Flash Ad creation).  Any help would be appreciated.

    Hi there,
    the clicktag is made so that publisers don't need to change the fla file all the time. The clicktag is a variable and can be given to the swf by doing example.swf?clicktag=http://www.grafia.fr for example. Normally it should be enough to put the actionscript you mentioned on a big button in the flash ad. The Clickabilty's cmPublish probably uses the example.swf?clicktag=http://www.grafia.fr for serving the ad.
    Greetings,
    Guido Braak
    My Websites: Agence web Bordeaux | La Roue Tourne | TV Soiree

  • Action script for making symbol hyperlink to open I'm same window?

     

    on (rollOver) {
         getURL("http://www.google.com");
    Ok so i have this and it seems to be the consensus on how to do it...
    Just open actionscript
    and type this
    unfortunately
    when i click on the symbol (was a jpg that i converted to a button)
    and open action window
    and try to type that, it tells me i can't do anything to the selection...
    Basically I want these moving symbols and symbols that fade in to be mapped to open up to (graphic design, retouching etc... pages of my site)
    This is all for a spash page i'm attempting to make

  • Action script for sound

    ok here is my goal.
    When a frame is loaded I want an mp3 to play but I only want
    it to play once. and NEVER again. Even if the frame is loaded
    again.
    What is the best way to achieve this?
    Thanks

    use:
    //if loading a streaming mp3 file from a directory
    var mySound = new Sound();
    mySound.loadSound('theFileName', true);
    //if loading a sound file from the Library with a linkage ID
    var mySound = new Sound();
    mySound.attachSound('sound_id');
    BUT, use a boolean conditional statement to limit the playing
    of the sound once, as in something like:
    if(!open) {
    var mySound = new Sound();
    mySound.loadSound('theFileName', true);
    open=true;
    the first time the file is instatiated, 'open' will be
    undefined therefore satisfying the condition, but from that point
    forward while the file is running 'open' will become true, and will
    not load the sound again.

  • Action Script for next frame

    Hi,
    I'm making an interactive world map.
    The idea is that the mouse rolls over a country which makes
    the country goes red and the countries name appears. I have got
    this to work fine, but I am trying to use some script so that when
    the mouse clicks down and releases on the country, another screen
    appears which is a screen with information about the country (the
    original screen needs to disappear - it's not a box of text which
    will appear but a whole new screen)
    Can anyone advise? I have tried to use a basic 'on release go
    to' script but it doesn't work.
    Thanks very much.

    Thanks, I've got this to work now, but when it advances to
    the next frame it keeps looping back to the first frame. I've tried
    using stop() on the frame I am advancing to, gotoandStop(2) in the
    first frame and a few other things I have found in the looping
    problem threads on this forum. I'm publishing as a flash movie not
    HTML.
    Any thoughts?

  • Conditional actions in Photoshop can't test for Lab color mode.

    I’m posting here because the feature request/bug report form isn’t currently working for Photoshop.
    I wanted to create an action to determine if the color mode of an image is Lab, and if so, convert it to RGB. But there’s no conditional action test for Lab color mode.  The list of conditions that can be tested includes RGB, grayscale, and a couple of other color modes, but not Lab,  Does anyone know of a workaround?  Can I get it done with scripting?
    It would be a big help if the next update of Photoshop CC could include a conditional action test for Lab color mode.

    This for example would convert an active Lab image to sRGB:
    if (app.documents.length > 0) {
    if (app.activeDocument.mode == DocumentMode.LAB) {
    app.activeDocument.convertProfile ("sRGB IEC61966-2.1", Intent.RELATIVECOLORIMETRIC, true, true);

Maybe you are looking for