# Adobe Javascript: Getting the position of a layer?

**URL:** https://forum.kirupa.com/t/adobe-javascript-getting-the-position-of-a-layer/246255
**Category:** design
**Created:** [December 9, 2007, 2:01am UTC](https://forum.kirupa.com/t/adobe-javascript-getting-the-position-of-a-layer/246255 "2007-12-09T02:01:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![slmille4](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@slmille4](https://forum.kirupa.com/u/slmille4)
#### Post date: [December 9, 2007, 2:01am UTC](https://forum.kirupa.com/t/adobe-javascript-getting-the-position-of-a-layer/246255/1 "2007-12-09T02:01:27Z")

</div>

I’m trying to write a script inside of photoshop which can trim and export all of the layers as .PNG files and also write a text file which lists the X Y coordinates of each layer in the file, along with the widths and heights. I’ve figured out how to get width and height after trimming, but I can’t find any function for listing the coordinates of the layers. Does such a thing exist? Thanks in advance to anyone who can tell me the function that will do this!
