Prompt for Levels not working in Photoshop CC

Hi,
I was helped on here a few months ago about a script that would promopt the user to create a levels adjustment layer, set the levels and then the script would be able to call the information again and apply the levels without user intervention.
Since upgrading to Photoshop CC it has stopped working correctly and I can't figure out why as it doesn't come up with any errors. It works on the prompt, alows the user to enter levels ect but when it comes to apply it to the next image it will just create an unaltered levels adjustment and move on. The script is below, any help would be much appreciated!
/// user prompt
var newLevelsDesc = newLevels();
//// apply levels without user
executeAction( charIDToTypeID('Mk  '), newLevelsDesc, DialogModes.NO );
function newLevels() {
    try{
var desc2 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putClass( charIDToTypeID('AdjL') );
desc2.putReference( charIDToTypeID('null'), ref1 );
var desc3 = new ActionDescriptor();
var desc4 = new ActionDescriptor();
desc4.putEnumerated( stringIDToTypeID('presetKind'), stringIDToTypeID('presetKindType'), stringIDToTypeID('presetKindDefault') );
desc3.putObject( charIDToTypeID('Type'), charIDToTypeID('Lvls'), desc4 );
desc2.putObject( charIDToTypeID('Usng'), charIDToTypeID('AdjL'), desc3 );
return executeAction( charIDToTypeID('Mk  '), desc2, DialogModes.ALL );
catch (e){

This seems to work in Photoshop CC.
function levelsAdjustmentDialog(){
       var desc = new ActionDescriptor();
        var ref = new ActionReference();
        ref.putClass( charIDToTypeID('AdjL') );
    desc.putReference( charIDToTypeID('null'), ref );
        var desc3 = new ActionDescriptor();
            var desc4 = new ActionDescriptor();
            desc4.putEnumerated( stringIDToTypeID('presetKind'), stringIDToTypeID('presetKindType'), stringIDToTypeID('presetKindDefault') );
        desc3.putObject( charIDToTypeID('Type'), charIDToTypeID('Lvls'), desc4 );
    desc.putObject( charIDToTypeID('Usng'), charIDToTypeID('AdjL'), desc3 );
    executeAction( charIDToTypeID('Mk  '), desc, DialogModes.NO );
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID( "AdjL" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
        desc.putReference( charIDToTypeID( "null" ), ref );
        desc.putObject( charIDToTypeID( "T   " ), charIDToTypeID( "Lvls" ), new ActionDescriptor() );
    return user_levels = executeAction( charIDToTypeID( "setd" ), desc, DialogModes.ALL );
function makeLevelsAdjustmentLayer( userDesc ) {
    var desc = new ActionDescriptor();
        var ref = new ActionReference();
        ref.putClass( charIDToTypeID('AdjL') );
    desc.putReference( charIDToTypeID('null'), ref );
        var desc3 = new ActionDescriptor();
            var desc4 = new ActionDescriptor();
            desc4.putEnumerated( stringIDToTypeID('presetKind'), stringIDToTypeID('presetKindType'), stringIDToTypeID('presetKindDefault') );
        desc3.putObject( charIDToTypeID('Type'), charIDToTypeID('Lvls'), desc4 );
    desc.putObject( charIDToTypeID('Usng'), charIDToTypeID('AdjL'), desc3 );
    executeAction( charIDToTypeID('Mk  '), desc, DialogModes.NO );
    if(userDesc!=undefined){
        executeAction( charIDToTypeID( "setd" ), userDesc, DialogModes.NO );
var desc = levelsAdjustmentDialog();
makeLevelsAdjustmentLayer( desc );

Similar Messages

  • Save for web not working in Photoshop element 6

    Save for web not working in Photoshop element 6. I am using Mac os x version 10.5.8   Anyone know how to fix that please tell me. Thanks

    I just copy the preferences from my computer for you to see what are shown about adobe
    file:///Users/raymondsmith/Library/Preferences/Adobe/
    file:///Users/raymondsmith/Library/Preferences/Adobe%20Illustrator%20CS2%20Settings/
    file:///Users/raymondsmith/Library/Preferences/Adobe%20Photoshop%20CS2%20Paths
    file:///Users/raymondsmith/Library/Preferences/Adobe%20Photoshop%20CS2%20Settings/
    file:///Users/raymondsmith/Library/Preferences/Adobe%20Photoshop%20Elements%206%20Paths
    file:///Users/raymondsmith/Library/Preferences/Adobe%20Photoshop%20Elements%206%20Settings /
    file:///Users/raymondsmith/Library/Preferences/AdobeUM/
    file:///Users/raymondsmith/Library/Preferences/AppleWorks/
    file:///Users/raymondsmith/Library/Preferences/ByHost/
    file:///Users/raymondsmith/Library/Preferences/CD%20Info.cidb
    file:///Users/raymondsmith/Library/Preferences/CDDB%20Preferences
    file:///Users/raymondsmith/Library/Preferences/cfx%23FBSxPfw
    file:///Users/raymondsmith/Library/Preferences/com.adobe.acrobat.90.sh.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.Acrobat.Pro7.0.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.acrobat.sh.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.Acrobat.Uninstaller.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.Adobe%20Help%20Viewer.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.ami.installer.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.bridge2.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.mediabrowser.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.PhotoshopElements.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.Reader_ppc_9.0.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.Reader.plist
    file:///Users/raymondsmith/Library/Preferences/com.aol.aim.plist

  • Save for web not working in photoshop CS4

    When I upgraded to Lion it seems the 'save for web' capability in CS4 produces a 'this operation cannot be completed error'.......would be grateful for any ideas....

    http://forums.adobe.com/message/3225967

  • Spacebar shortcut for hand tool not working in Photoshop CC - have tried closing all other programs

    The spacebar shortcut for hand tool is not working in Photoshop CC - as suggested in this form & others I have tried closing all other programs with no result. I have also reset photoshop to default settings & this did not make any difference either.

    There may be a software conflict. I went through this today. When I did a search in Adobe foruns actually found tha answer on the Illustrator forum:  http://forums.adobe.com/thread/1027227?
    What the problem for me was an app called - 1Password.  I had opened it, but not given my password to login and it was on in the background. As soon as I quit 1Password, the spacebar Hand Tool worked.
    Then I opened 1Password again, and logged in. This time the spacebar works.
    Others mentioned conflict with Spotify. And Chrome too. Couple other things. Read that thread in the link above.
    Good luck!

  • Logitech mouse buttons not working in photoshop cc 2014

    logitech mouse buttons not working in photoshop cc 2014 winds 8.1. Is this a common problem?
    I have updated the latest drivers and have a few buttons programmed with keyboard shortcuts that used to work in previous versions of Photoshop but don't work now.
    Scrolling with mouse in bridge stopped working in cc butI see it is now working.
    any ideas?

    Many Photoshop extensions are not compatible with Photoshop CC 2014 for Adobe removed support for Flash Panels in CC 2014. Many extensions panels are flash based.  Check with the developer to see if their blendmein extension works with CC 2014.
    Adobe does not maintain Photoshop so it backward compatible with prior versions of Photoshop.  This brakes things like action scripts plugins extensions etc. Keep old version of Photoshop installed....

  • My operating system windows XP not working with photoshop cloud, why not?

    I need to add 2 more licences for photoshop cloud and I'm being told my operating system windows XP does not work with Photoshop cloud. We already have 2 pcs using it in our office so why not?
    Please help
    Roy

    Do you have the latest version of iTunes?  If not, get it at:
    http://www.apple.com/itunes

  • Bridge CC Tools - Photoshop - Batch does not work in Photoshop CC 2014.

    in Bridge CC Tools - Photoshop - Batch does not work in Photoshop CC 2014. At first I didn't even see the option but I reinstalled Photoshop CC and now I see the menu option but when I try it there is a message that I need to use Photoshop CC. So I open Photoshop CC and the same thing happens? I can't seem to make it work.

    Kitty,
    Your screen shot is in the virus scanning queue, where it can linger for minutes, hours, days or weeks.
    If you use the camera icon in the reply editor's formatting bar, you can embed your image in your post, where it will be viewable instantly.
    then:
    As for your issue, make sure all applicable scripts are checked in Bridge preferences:

  • [EB3]Events not working in Photoshop

    Hi All,
    Except the "applicationActivate", other events-
    - documentAfterActivate
    - documentAfterDeactivate
    - documentAfterSave
    are not working in Photoshop; strange thing is that they are working in InDesign.
    The code I'm using(working in case of InDesign)-
    var csInterface = new CSInterface();
    csInterface.addEventListener("documentAfterActivate", myEventHandler);
    function myEventHandler(){
         alert(event.type); // not alerted in case of photoshop
    Are these events not implemented in Photoshop? I also want these events with Illustrator (not tested yet)
    Any help will be highly appreciated

    Hi Shadowfax,
    Thank you for reporting this. The mechanism of CSInterface Events needs Products like PS or
    ID to send out the event like “applicationActivate” at the right time. However,
    not all Products send out all events now; attachment events.png is a table that
    listed current situation. Our team is actively pushing this issue forward and has asked Products team to
    send out necessary events.

  • CC 2014 nik efex - My Nik Efex filters are not working in Photoshop CC 2014 - they appear under plug-ins and seem to work, but after running and clicking okay, no new layer appears - seems to have no effect.  The separate menu panel does not appear either

    My Nik Efex filters are not working in Photoshop CC 2014 - they appear under plug-ins and seem to work, but after running and clicking okay, no new layer appears - seems to have no effect.  The separate menu panel does not appear either.  Help with this?

    BINGO !!!!
    Thanks so much Woodsroad. I had the exact same problem with my Dell Windows 7 64 bit with AMD Radeon 6700 Video card.
    All the video tests passed with flying colors.
    The sniffer rename trick fixed the problem.
    Thank goodness for the internet!

  • Perspective Warp not working in Photoshop 2014? Anyone else having this problem?

    Perspective Warp not working in Photoshop 2014? Anyone else having this problem?

    I cannot use Perspective Warp. | Mylenium's Error Code Database
    Mylenium

  • New fonts not working in photoshop...

    I have installed new fonts on my mac but they will not work in Photoshop.. can somoene help me? I don't know if I have done something wrong or need to take another step.. I am running CS4 and OS 10.6.4. The message I get when I try to use a font I recently installed is "Could not complete your request because something prevented the text engine from being intitalized." Any help would be greatly appreciated!
    Lisa

    Most likely you have some corrupt fonts installed.
    Try validating the fonts using FontBook to find the most obvious problems.

  • Merge to HDR Pro does not work in Photoshop 14.2.1. Image appears black. What is the problem?

    Merge to HDR Pro does not work in Photoshop 14.2.1. Image appears black. What is the problem?

    Attached is screen shot. What happens is I go to File/Automate/Merge to HDR Pro, then select my 3 images, which are flattened psd files (I have tried tifs and jogs too), hit OK, it processes them, but instead of the image appearing, I get this black image. You can see my original images at bottom... jpegs too),

  • [svn:fx-trunk] 13257: Fix for @inheritDoc not working on a setter, but works on a getter

    Revision: 13257
    Revision: 13257
    Author:   [email protected]
    Date:     2010-01-04 10:49:13 -0800 (Mon, 04 Jan 2010)
    Log Message:
    Fix for @inheritDoc not working on a setter, but works on a getter
    QE notes: None.
    Doc notes: None
    Bugs: SDK-24727
    Reviewed By: Paul
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24727
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ClassTable.java

    steabert wrote:
    Hi,
    I had a similar problem with my Dell Latitude E4310, and apparently also the E6410, E6510.
    The solution for me was to add the following line to /etc/modprobe.d/modprobe.conf:
    options snd-hda-intel model=dell-s14
    I tried that, unfortunately it does not work with this chipset. I do get a different set of channels though but it still cannot record anything. Maybe this chipset is too "new" for alsa. The latest release dates back from the end of January. Support for it is explicitly stated in the changelog to 1.0.24 but perhaps the recording part of it slipped through the cracks. ALSA bug tracking system seems quite closed.

  • Logging for AS not working

    Hi,
    In sm21, I cannot see any logs from the AS. I can only see the ones from CI.
    Any ideas how to solve this issue ?
    Anything is welcomed,
    Thanks.

    Hello
    This thread was locked for the following reasons:
    1) the topic does not relate to PI. This forum is for PI technical issues only.
    2) it is against forum rules to post the same issue on multiple forums - Re: Logging for AS not working
    Regards
    Moderator

  • ICloud for pc not working tried everything

    iCloud for pc not working tried everything ( uninstall - reinstall - delete files - old versions ) nothing helps it just downloads a couple of photos and off again my iPhone uploads perfectly as all the pics goes to the iPad seamlessly, Please Help i'm on windows 8.1 x64, Thanks

    I think that the card reader may in fact be defective, but it just doesn't make sense if I have already used it fine before. I've tried everything on this Apple support page, thank you though.
    Does anyone have any suggestions?

Maybe you are looking for

  • Why is it so difficult to print a photo?

    I have wasted about 20 4x6 pieces of photo paper trying to print a picture! I have a digital pic that is way larger than 4x6. I want to scale it down and print borderless 4x6, but there must be some magic incantation that I can't figure out! I have t

  • Regarding servlets instance and client

    Hi Suppose 5 client programs are calling one servlets at a time. Then how many instance will create 1 or 5? if 1 then how 5 requests will be be processed

  • White line in middle of screen on macbook air

    When I am on a screen sometimes my macbook air shows a white line. on the right it is brighter and on the left it is dimmer. I have seen it on the startup screen, and on youtube videos.

  • Transfer file from client to server using http

    HI friends, I want to transfer files from client to server...I tried that with the help of socket and rmi.......... But Http is only the best mechanism for my application.......... Without using servlets, how to transfer files with the help of http..

  • FRM-40011 Error on Oracle 9i AS

    Hi! I have a form deployed on Oracle 9i AS Release 2. The form is compiled on forms 6i -Patchset 14 and when I try to access this form on the client PC I get FRM-40011 error that the form has been created using lower version of From builder. If I com