Can't get "true" height of text box (text object) in Photoshop CS4-CS6 on Mac

I'm seeing this behavior in CS4, CS5 and CS6 on the Mac using AppleScript. When I get the height of a text object layer as such:
     tell app "Adobe Photoshop CS4"
          tell current document
               set textObjectHeight to height of text object of art layer 1
          end tell
     end tell
The value returned doesn't match the height of the text object. In my mind the text object is the box that's displayed when I click on text in a text layer with the text tool active. The value for the width appears to match, just as I'd expect.
I'm trying to get the height and width of the text box (text object) so that I can draw a box "underneath" it on another layer so that one can tell where the text box is. Kind of an FPO-type assistant. I'm currently using the position values and the height and width to create a colored box. I realized that the height isn't exactly right.
Any help would be great appreciated. I've not explored the use of Javascript thus far, but am open to that as a solution.
Thanks,
Stephan

I tried your code and it works just fine here… I used CS5 to try it… Here is a screen shot… I just put a solid fill layer at the bottom so you can see the guides…
Script editor's event log gives me…
tell application "Adobe Photoshop CS5"
  activate
  get position of text object of art layer 1 of current document
                    {150.0, 100.0}
  get width of text object of art layer 1 of current document
                    800.0
  get height of text object of art layer 1 of current document
                    449.999969482422
  make at end of current document with properties {name:"fill"} new art layer
                    art layer 2 of document "Untitled-1"
          select current document region {{150.0, 100.0}, {950.0, 100.0}, {950.0, 549.999969482422}, {150.0, 549.999969482422}} without antialiasing
  current application
  fill selection of current document with contents {class:RGB color, red:255, green:0, blue:0} blend mode normal opacity 100 without preserving transparency
  current application
  deselect current document
  current application
end tell

Similar Messages

  • Can't get rid of the # when adding text

    I'm trying to edit a document in Indesign. I started by doing a Pre-Flight to correct errors and have one left I can't get rid of.
    Originally the Text Error was for a font that ID could not find so I changed the font to what was already being used for other text - an included font - Charlamagne Std Regular
    When trying to type text into a text box the type jumps to just above the text box where the pound sign (#) sits.
    When entering type, even after positioning the curser inside the text box, it jumps the text to right before the pound sign, on top of the text box, and adds a pink box under the text.
    I have attached a screen shot to show this. How to I get rid of the pound sign and pink box to be able to simply type some text in the text box (that the pink box is in)? Thanks!

    @dkg62 – to make clear what's going on, select the text frame and show us another screenshot.
    There are at least four cases where you can get a text like that. All cases imply, that the font you'd like to use is missing. I simulated this by formatting text with a font weight that is not available by a character style.
    1. The most likely case: There is baseline shift applied; here in my case 9pt.
    All other cases are academical, because the pink highlighting is aligned with the text:
    2. Text frame options, baseline set to a fixed value (zero in this case)
    3. Text on path and the text frame options (baseline) is just the standard default. You can see a second #-end of story sign inside the text frame.
    4. Text on path and the text frame options (baseline) is set to fixed (zero in this case). The second #-sign inside the text frame is shifted above because of the fixed value of the baseline option of the text frame options. And obscured by the pink highlighting.
    Uwe

  • How can I get the height of an UIComponent programmatically?

    How can I get the height of an UIComponent programmatically? In my case the component is a Panel Box which has bindings to a backing bean. But it seems the RichPanelBox does not have have method like getHeight()

    Use setInlineStyle(java.lang.String inlineStyle) method.
    RichPanelBox panelBox;
    panelBox.setInlineStyle("height:400px");
    Thanks,
    Navaneeth

  • How do you get the text box text properties dialog box to appear on a MAC?

    how do you get the text box text properties dialog box to appear in Adobe Reader XI on a MAC? I know windows is Ctrl-E but can't figure out what to hit for Mac.

    Right-click the toolbar and you should find it there (including the short-cut, which is probably Cmd+E).

  • How can I get rid of the added / preset  text words included in my text messages.  It always says something like "Please call back at

    How can I get rid of the added / preset  text words included in my text messages.  It always says something like "Please call back at ###-####."

        JenJenTen,
    I understand that having a preset text that you did not want can be a bit frustrating when sending out text. To clarify, is the preset message like a signature at the end of your text? Does this only happen in text messages or when your send emails also? Is your SMS delivery confirmation on? Messaging>Settings>SMS delivery confirmation.
    LindseyT_VZW
    Follow us on Twitter @VZWSupport

  • How can I get rid of a green box with a white check mark in it this box is covering some of my photos and on the windows icon for firefox.

    How can I get rid of a green box with a white check mark in it this box is covering some of my photos and on the windows icon for firefox. edit

    When I search for solutions, I find several references to the backup feature of Norton 360. There also were references to MozyHome and McAfee.
    http://community.norton.com/t5/Norton-360/Green-check-marks-on-icons-N360/m-p/40982
    http://answers.microsoft.com/en-us/windows/forum/windows_xp-pictures/white-check-mark-in-a-green-box/71b70580-b5f1-4336-8d72-71faf1f55cd6

  • I am a teacher who would like to use my Ipad2 in the classroom -but out school only has projector that has VGA inputs. And just to complicate thing I was to use it wirelessly (I have an Itv also). Can I get true mirrioring?

    I am a teacher who would like to use my Ipad2 in the classroom -but out school only has projector that has VGA inputs. And just to complicate thing I was to use it wirelessly (I have an Itv also). Can I get true mirrioring?

    The one you are looking at I believe is an older model and does not have very good reviews for working with an AppleTV2 / iPad 2 setup.
    Here is the one that has worked for our district:
    http://www.amazon.com/ViewHD-Component-Converter-Support-Surround/dp/B004F9XVBC/ ref=pd_cp_e_2
    I can't say if the one you are referring two works or not, however I can say that based on the reviews, it looks like you may run into problems with the $45 version.

  • I have lost my i phone 4s how can i get my IMEI number without box or set?

    I have lost my i phone 4s how can i get my IMEI number without box or set?

    You can get your IMEI through iTunes, assuming you have backed up your iPhone using iTunes.
    Open iTunes' preferences (under iTunes in the menu bar).  Choose the "Devices" tab, and hover your cursor over the iPhone entry.  The IMEI will appear.
    I suspect knowing the IMEI will not do you a whole lot of good, but for what it's worth ... that's how to get it.

  • How can I get all photos from iPhoto to automatically back up to iCloud from my Mac OSX Version 10.6.8 operating system.  Not enough memory to upgrade.

    How can I get all photos from iPhoto to automatically back up to iCloud from my Mac OSX Version 10.6.8 operating system.  Not enough memory to upgrade.

    You can't.  iCloud is not for general file backup from a Mac. It's for backup up and syncing data between mobile devices and and Macs and  The following is from this Apple document: iCloud: Backup and restore overview.
    iCloud automatically backs up the most important data on your (mobile) device using iOS 5 or later. Once you have enabled Backup on your iPhone, iPad, or iPod touch .....
    What is backed up
    You get unlimited free storage for:
    Purchased music, movies, TV shows, apps, and books
    Notes: Backup of purchased music is not available in all countries. Backups of purchased movies and TV shows are U.S. only. Previous purchases may not be restored if they are no longer in the iTunes Store, App Store, or iBookstore.
    Some previously purchased movies may not be available in iTunes in the Cloud. These movies will indicate that they are not available in iTunes in the Cloud on their product details page in the iTunes Store. Previous purchases may be unavailable if they have been refunded or are no longer available in the iTunes Store, App Store, or iBookstore.
    You get 5 GB of free iCloud storage for:
    Photos and videos in the Camera Roll
    Device settings (for example: Phone Favorites, Wallpaper, and Mail, Contacts, Calendar accounts)
    App data
    Home screen and app organization
    Messages (iMessage, SMS, and MMS)
    Ringtones
    Visual Voicemails
    But not from a Mac.  If you want to backup your photos and other important files I suggest you get an external hard drive and use  it with Time Machine.
    OT

  • I bought a mac air retina to replace a mac pro. How can I get all files of the back up and copy them to the new mac?

    I bought a mac air retina to replace a mac pro. How can I get all files of the back up and copy them to the new mac?

    Mail window may be in the Full Screen mode.
    Move the mouse pointer to the top right corner of the Mail window and hold it there.
    Menu bar should drop down and click the blue double arrow icon.
    Full Screen toggle shortcut:  control + command + F

  • How can i get the value stored in the session object using its sessionid

    how can i get the value stored in the session object using its sessionid by running stand alone java application

    myforum wrote:
    how can i get the value stored in the session object using its sessionid by running stand alone java applicationThis does not seem to make sense! You need at least to give a lot more detail of what you are doing.

  • I can't get adobe bridge to open on my iMac... CS6 works perfect. Any ideas of what I need to do?

    I can't get adobe bridge to open on my iMac... CS6 works perfect. Any ideas of what I need to do?
    Thanks Judy

    The lack of security updates requires me to update any old OS. Unless you never connect to anything on the Internet with the computer OR you never have anything to protect on your computer running such a computer leaves you open to theft, fraud, etc. The major problem with Mavericks and soon with OS X.X is unfamiliarity. Sure they have features we don’t like. But I bet so did the one you are running, when you upgraded to it.
    Having said that I really got miffed when I was required to update my TV to work with digital signals. I have no trouble telling people to upgrade their computer, but ask me to upgrade my TV those were fighting words.

  • How can I get rid of HP Rewards "Redeem your HP Reward!" message on my Mac?

    How can I get rid of HP Rewards "Redeem your HP Reward!" message on my Mac?    The coloured wheel spins endlessly rendering it impossible to respond to the message.

    Hi arnienelly,
    Welcome to the HP Support Forums.   I gather that you are getting the HP Rewards pop-up on your computer.
    Did you follow the instructions that Ciara_B gave in her post directly above yours?  If so, what was the result?
    Thank you.
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • Can't get duplex print option for pdf files using  Adobe ReaderXI 11.0.04, Mac 10.8.5 with HP8600

    I get two-sided option for normal printing, but
    I can't get duplex print option for pdf files using  Adobe ReaderXI 11.0.04, Mac 10.8.5 with HP Officejet Pro 8600.  HP says it's an Adobe problem. I'm stuck.
    Thanks in advance.
    VO

    It depends where the pdf is located. If in the Finder or in an attachment to
    an email in Entourage, the message is ³You can¹t open the application
    ³Acrobat Reader 5.0² because PowerPC applications are no longer supported².
    If an attachment in an email that has come via Safari, the message is
    ³Safari can¹t open the file because no available applications can open it².
    In each case the menu bar is Finder or Entourage or Safari as the case may
    be.

  • Can I get the cheaper CC-membership when I just own Photoshop CS 5 extendet as student & teacher ver

    Can I get the cheaper CC-membership when I just own Photoshop CS 5 extendet as student & teacher version?

    Check this:http://www.adobe.com/products/creativecloud/students.edu.html?

Maybe you are looking for