TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

Photoshop script (textItem.width)

Page: 1 Reply
Jan 15th 2007#175906 Report
Member since: Jan 15th 2007
Posts: 2
I am very new to scripting and I am having a little difficulty retrieving an accurate width for my text.

My code:

var widthx = artLayerRef.textItem.width.value;
var w = (227 + ((border-1)*687)) + ((605-widthx)/2);

widthx is passed to a function I named GetDim(widthx...etc) which contains the second statement (var w= 227......)

The width that I get isn't the actual pixel width of the text (I measured it in photoshop). If anybody can help it would be deeply appreciated.

Thank you.

Eitan
Reply with Quote Reply
Jan 16th 2007#175929 Report
Member since: Mar 18th 2001
Posts: 6632
What language are you coding in and what is it for? Hard to be of any help with just a snippet of code.
Reply with Quote Reply
Jan 16th 2007#175930 Report
Member since: Jan 15th 2007
Posts: 2
I'm coding in Javascript. My question basically boilds down to, why doesnt artLayerRef.textItem.width.value return the actual width of the text content?
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum