Jump to content


Photo

Photoshop JSX Script Help


  • Please log in to reply
2 replies to this topic

#1 android

android

    Young Padawan

  • Members
  • Pip
  • 25 posts
  • Gender:Male

Posted 03 November 2010 - 09:14 AM

var docDim = app.activeDocument.width + "x" + app.activeDocument.height;

...

fileNameBody += "_" + layerName + docDim;
This is outputting 800 px x 800 px How would I drop px from the string?

#2 rc69

rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 03 November 2010 - 10:07 AM

Assuming that is essentially JavaScript you're working with, try:
app.activeDocument.width.replace('px', '');

Edited by rc69, 03 November 2010 - 10:07 AM.


#3 android

android

    Young Padawan

  • Members
  • Pip
  • 25 posts
  • Gender:Male

Posted 03 November 2010 - 02:43 PM

Mucho thank you




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users