Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Cloudflare is experiencing elevated issues across all platforms. Load times for pages and images may be longer than expected. We are continuing to monitor the situation.

Token / Graphic & Top / Left Positions

Is there a way with with any available API scripts to output the Top and Left positions of a token to chat? (Possibly with ShowAttr? What would the syntax be?)
I got impatient and threw together a little snippet to do the job for me: //By Kastion //<a href="https://app.roll20.net/users/3173313/kastion" rel="nofollow">https://app.roll20.net/users/3173313/kastion</a> //version: 1.0 //!getpos [token_id] on('ready', function() { log("-=&gt; Get Position Command &lt;-= [Last Edited by Kastion July 11th 2018]") on('chat:message', function(msg) { if (msg.type == "api" &amp;&amp; msg.content.indexOf("!getpos") !== -1) { let args = msg.content.split(/\s+/); var t = findObjs({ _type: 'graphic', _id: args[1].trim() }); if(t[0]) sendChat('POSITION', "/w gm **TOP:** " + t[0].get("top") + " **LEFT:** " + t[0].get("left")); }; }); });