Repositioning of layer not working in Adobe Photoshop CC (but works in CS6)

I have a simple script that pulls in a defined layer of another open image, resize and move the layer to the bottom right of the image. Logo, branding for photography, basically. Seems to work fine in CS6 and most older versions, but does not work in the latest version of Adobe Photoshop CC 2015.

The hitch seems to be the positioning of the layer, as the logo is going where it is supposed to when running, but when not exactly moved to the 0,0 coordinates. Has something changed in the new version that would make the following code incompatible? What Miss me?

var leftOffset = ((docWidth * .97) - logoWidth)
var topOffset = ((docHeight * .97) - logoHeight)
var newX = new UnitValue(leftOffset,'px'); // the x pos to move the layer to
var newY = new UnitValue(topOffset,'px'); // the y pos to move the layer to
var offsetX = new UnitValue( newX - currentBounds[0].as('px'), 'px'); // the required offset needed for move
var offsetY = new UnitValue( newY - currentBounds[1].as('px'), 'px'); // and the y
logoSet.translate( offsetX, offsetY ); // move the layer

Found the problem. The units of the rule app to use pixels against inches (which is what it was originally set on).

Adding the following text to the script solved the problem:

app.preferences.rulerUnits = Units.PIXELS

Tags: Photoshop

Similar Questions

  • I bought Adobe creative suite 5 master collection a few years ago. I got a new mac and I tried to install Photoshop. The serial number does not work (this serial number is not valid for adobe photoshop cs6 extended).

    Hello

    I bought Adobe creative suite 5 master collection a few years ago. I got a new mac and I tried to install Photoshop cs6.

    The serial number on the box no longer works (this serial number is not valid for adobe photoshop cs6 extended).

    I have the serial number with me if you're Adobe and contact.

    Thank you

    Susan

    Hi again,

    Concerning

    Rohit

  • I have the disc to download Adobe Photoshop CS2, but I do not have a CD-ROM on my laptop, is it possible that I can get it without a CD?

    I have the disc to download Adobe Photoshop CS2, but I do not have a CD-ROM on my laptop, is it possible that I can get it without a CD?

    CS2 (or earlier version) activation server has disappeared, then read below

    You MUST use the special number on the page, not your original serial number

    l http://helpx.adobe.com/x-productkb/Policy-Pricing/Creative-Suite-2-activation-end-Life.htm

    NOTE that CS2 will not install on a Mac "modern", and when you install the special version of the PPro2 on a Win7 or Win8 or Win10 computer, you may need to right click on the program icon and select Windows XP compatibility in the popup of option

    ... AND Vista problems https://forums.adobe.com/thread/416347

  • This serial number is not valid for Adobe Photoshop elements 13

    I bought both Adobe Photoshop and elements 13 first.  I received my serial numbers by e-mail and on the site of Adobe.  I'm trying to install Photoshop and I tried the TWO serial numbers (including copy them / paste) and every time I get the message error "this serial number is not valid for Adobe Photoshop Elements 13"

    Start here, error "serial number is not valid for this product". Creative Suite

    If this does not help, contact the adobe support, https://helpx.adobe.com/contact.html

  • Hallo :-) ICH nutze Adobe Photoshop CS5 and Premiere Pro CS6 - sharp program konnte ich vor einem Jahr bei einem Handler kaufen! Leider there mir heute die Zusatzprogramme wie 1. CS6 hearing 2. Adobe After Effects CS6. (Like erweitern möchte)  Ich

    Hallo :-) ICH nutze Adobe Photoshop CS5 and Premiere Pro CS6 - sharp program konnte ich vor einem Jahr bei einem Handler kaufen! Leider there mir heute die Zusatzprogramme wie 1. CS6 hearing 2. Adobe After Effects CS6. (Like erweitern möchte)  ICH konnte eine Bundle CS6 jetzt mit allen Programmen zusammen kaufen diesen, was mir meine Arbeit der würde. Dabei muss Aufenthaltsraume.man CS6 Software CS5 deinstalliert werden und die. Stay EIB verhindern sharps beams CS6 already erstellten Filmdateien und Projekte receive nehmen sharp dabei Schaden oder alle?

    Link to buy the CS6 via phone http://www.adobe.com/products/cs6.html read all the way down

    From what I was told by an employee, newer than 10.7 Mac must subscribe in the cloud instead of buy CS6... and someone with Win10 must also subscribe to the cloud for CS6 is not compatible (meaning that the seller will ask you your operating system and not sell you CS6 if she does not work on your computer... I don't know if this means that Win7 and you can't buy if you have Win8)

    Please report back with your operating system if you are able to buy CS6

  • bought adobe photoshop cc but forgotten id

    bought adobe photoshop cc but forgotten id

    This is an open forum, not Adobe support... below to connect with Adobe personnel to help

    While the forums are open 24/7 you can't contact Adobe support at any time

    Chat support: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • I have a monthly subscription to CC Adobe (Photoshop &amp; Lightroom), but LR6 (CC) is only available in the 30 day trial. Why?

    I have a monthly subscription to CC Adobe (Photoshop & Lightroom), but LR6 (CC) is only available in the 30 day trial. Why?

    have you installed lr 6 using your desktop cc app?

    If so, log out and then back to your application of office cc, Sign, Sign out | Creative desktop application Cloud

  • Hello, I just bought a camera intelligent samsung nx. Inside, there are 5 DVD ADOBE PHOTOSHOP LIGHTROOM, but I have a macbook pro without DVD. How can I install this product? Thank you

    Hello, I just bought a camera intelligent samsung nx. Inside, there are 5 DVD ADOBE PHOTOSHOP LIGHTROOM, but I have a macbook pro without DVD. How can I install this product? Thank you

    Download and install the trial version of http://prodesigntools.com/lightroom-5-ddl-comparison-vs-lr4.html then activate it with your serial number.

    Make sure that you follow the instructions 0 ~ 6 before the download link on this page.

  • Maybe reinstall adobe photoshop cs4, but adobe AIR version is no longer supports the version need a updated version?

    Recharge adobe photoshop cs4, but the version of adobe AIR is no more supported.  Where can I download the updated version to support the program?

    http://get.Adobe.com/air/

  • AppleScript to resize images in Photoshop CS4 will not work in CS6 - help!

    Hi people.

    I am new to this lark script and hope someone can help...

    Our Nigel, unfortunately is no longer with us, wrote a cunning to convert script photographs large size smaller using Photoshop CS4.

    The workflow is the following:

    You open Photoshop

    You have two files, one with the original files and the other which is empty.

    You drag the folder with the original files on the .app and he asks a destination folder (tell you him to use the empty folder).

    The images are then opened one by one, resized, some tape removed and are then registered to the empty folder (formerly).

    Lovely jubbly.

    The problem is when you try to use this app with Photoshop CS6 - it fails at the point of backup files in the new folder which gives this error:

    Adobe Photoshop CS6 has been an error: "unable to get document"075.jpg". (- 1728)

    I fiddled with the script a little and it seems don't not like the section "with options" command 'Save document' (it works fine if I completely remove the fuse "with options" - but I need than LZW compression).  I have trawled through a few similar questions on these forums, but have not been able to track down the problem. It probably doesn't help that I'm not a programmer (just try to translate as I oppose using the Photoshop CS6 AppleScript reference guide).

    Did everyone there knows the problem please?

    The script is below.

    on Open ()pourla)

    set theDestination of (choose folder with guest 'set the destination for the files processed...) ") as text

    tell application "Finder"

    set isContainer to fake

    set theItem to agenda 1 of pourla as string

    if last character of theItem is ":" then

    set list of files to files of all of the content of agenda 1 of pourla

    on the other

    set list of files to pourla

    end if

    Repeat with x in list of files

    set Dittos to x as texte

    set theFileName to name of x as texte

    set outFilePath to theDestination & theFileName

    if theFileName ends by ".db" then

      --

    on the other

    tell application "Adobe Photoshop CS6"

    -I was skilled enough change the foregoing of "Adobe Photoshop CS4".

    set units of the rule of parameters to units of mm

      Open alias theFile

    set theWidth to width of document theFileName

    set theHeight to height of document theFileName

    if theWidth > theHeight then

    Resize image document theFileName width 65 resolution 400 resample method bicubic

    on the other

    Resize image document theFileName height 65 resolution 400 resample method bicubic

    end if

    convert document theFileName profile ' Coated FOGRA39 (ISO 12647-2: 2004) " intent perceptive with blackpoint compensation without dithering .

    { adjust layer of art 'History' of the document theFileName with curves with options { }class:curves points of the curve: {{0, 0}, {128, 128}, {243, 255}}}

    { Save document theFileName in outFilePath like TIFF adding tiny extension with options { }byte order:Mac OS embed the color profile:fake image compression:LZW} without copy

    close document 1 saving no

    fin say

    fin if

    -display outFilePath dialog box

    fin Repeat

    fin say

    end open

    file name

    Try this.

    game of myOptions to {class:TIFF to save options, the byte order:Mac OS, embed the color profile:false, image compression:LZW}

    Save document theFileName in outFilePath as TIFF with options myOptions by adding the extension lowercase without copy

    HTH.

  • How to open in CS2: "not an image Adobe Photoshop PDF file.

    There must be a way to open .pdfs in CS2 that have been dumbed down to Acrobat 4.0, Acrobat Pro - don't you think?  I have created the .pdf in AutoCAD r 2017 (much too advanced for CS2), opened in Acrobat 7.0 Pro, used to "Reduce the size of the file" to make it compatible with Acrobat 4.0 and later versions.  Still can not open in PS CS2: "Could not complete your request because it is not an Adobe Photoshop PDF image file."

    Any other tips to get CS2 to read a .pdf not created in CS2?

    Thank you.

    You could try to post the PDF here. Also, you can download a free trial of 7 days from the latest version of Photoshop to see if the PDF opens in this.

  • ACTIVATION CODE IS NOT RECOGNIZED FOR ADOBE PHOTOSHOP ELEMENTS 14 AND 14 ITEMS FIRST

    I have entered it correctly the activation code for Adobe Photoshop elements 14 and 14 items first and get a message that the activation code is not correct and not recognized

    Contact adobe during the time pst support by clicking here and, when available, click on "still need help," https://helpx.adobe.com/contact.html

  • I CAN NOT CONNECT TO ADOBE PHOTOSHOP 7.0 - NEED HELP?

    Hello.. .my name is Bob and I have a problem with the opening of session on Photoshop 7.0 with my computer Windows XP Office above.    Photoshop was working fine last night then this morning when I tried to log in on the home page gets up and goes through all the cards in and initializes and then disappears!


    There is no error message or anything the page disappears.  I tired many times and restarted the computer often and always the same problem!


    There, someone can help me solve this problem?   Everyone knows the same situation with Photoshop 7.0?


    Thank you... we look forward to your response!


    Bob

    Hi bobteemovies,

    Please try and reset the Photoshop preferences.

    To re-create the Photoshop preferences files, start the application while pressing Ctrl + Alt + Shift (Windows) or command + Option + shift (Mac OS). Then, click Yes to the message, "Delete the Adobe Photoshop settings file?"

    Related link: functions of files preference, names and places. Photoshop CS5

    Let us know if it helps.

    Kind regards

    ~ Mohit

  • How can I get my support for Wacom Bamboo tablet to work in Adobe Photoshop Elements 10 and PS CS6?

    I bought a Wacom Bamboo tablet medium yesterday and I downlaoded as Photoshop since the supplied Setup CD.
    I'm having some trouble with the Bamboo pen not working in some applications and working with others - but the main problem is that
    It's as if the Tablet is not connected at any time I open Photoshop

    I try and move the slider of the computer with the bamboo on the tablet pen does not work.

    I don't know what to do! Help, please?

    Hello

    You should go to the wacom website and download the latest version of the driver.

    http://www.Wacom.com/en/support/drivers

  • the MTS files do not work in CS6... Why not Adobe

    If I have a file in my camera sony in Prem Pro .mts, reports the video but no sound?  If I have him drop it into CS5.5 sound works.

    I downloaded an updated version of the Prem Pro from Adobe today June 2012. And still he will not address the mts files?

    I don't understand why it is so difficult to find a solution to this problem. two of the worlds biggest companies Sony and Adobe, and none of them covers the question on their site, and yet it is clearly a major problem?

    I've seen talk about on the site of renaming of files, which does not work and would be a pain in the rear.

    Does anyone have a solution that works?

    Please?

    FIXED Yipeeee!

    It is not all good news though, but I have a solution that will definitely work for you, all that it's a bit drastic

    This problem has been to kill me. I just want to be able to drag and drop the MCS file in first pro, as I always have with other video files and all the nonsense to shoot the whole folder structure just won't DO, we do not live in the 70s. And thank God, the file structure is just stuff and nonsense.

    What is happening is that... something on your PC does not work files (and Adobe do not have any idea what it is) and besides that I do, but until a person learns, I can tell you that a full blow and reload new windows will be 100% solve the problem.

    Now, I don't have one for years, so it was a complete pain and took more than a day to recover all the way I like it and to be honest, it will be a week before as I have all my favorite programs work properly.  BUT I can tell you that with Premiere Pro installed, I can now just PULL THE FILES FROM the CAMERA PHOTO HARD DRIVE and let FALL THE LIKE ANYWHERE and better yet, pull them in first ruined as I want and they play 'Sound and all' and that my friends is the way it should be

    I really hope this helps some of you, I'm glad it works now and I can get some work done, I began to hate my new camera, but now, I can tell you it's A1

    For Adobe, I can tell you that some parameters of another installed program system is clearly the culprit but I can't for the life of me tell you who.  I can say that it is not mine, or the programs fault but a lack of tests on from Adobe.  Because clearly, it is not, and a good number on your forum, and many others. Software should work under any scenario, I'm not running certainly all the strange programs that should cause this.

    Until Adobe can pin point a solution and patch their program, I can recommend my solution buy guys and girls make sure to save all your mail, Favorites, passwords, documents and any other valuable to you before doing a clean install and if you will reply in the Groove with our favorite editor PP CS6.

    TTFN

    I need to get some work done

Maybe you are looking for