Since you can use the API, here is a little script the Aaron wrote for me once upon a time. Us the command !retrieve-tokens and any tokens off the edge will be moved to just inside the edge. on('ready',()=>{ const EPSILON = 5; const getPageForPlayer = (playerid) => { let player = getObj('player',playerid); if(playerIsGM(playerid)){ return player.get('lastpage'); } let psp = Campaign().get('playerspecificpages'); if(psp[playerid]){ return psp[playerid]; } return Campaign().get('playerpageid'); }; on('chat:message', (msg) => { if('api'===msg.type && playerIsGM(msg.playerid) && /^!retr(ie|ei)ve(\b|$)-tokens/i.test(msg.content)){ let who = (getObj('player',msg.playerid)||{get:()=>'API'}).get('_displayname'); let pid = getPageForPlayer(msg.playerid); let page = getObj('page',pid); let pHeight=page.get('height')*70; let pWidth=page.get('width')*70; const outside = (t) => { let hw = (t.get('width')/2)-EPSILON; let hh = (t.get('height')/2)-EPSILON; let offU = (t.get('top')+hh)<0; let offL = (t.get('left')+hw)<0; let offD = (t.get('top')-hh)>pHeight; let offR = (t.get('left')-hw)>pWidth; return offL || offR || offU ||offD; }; const moveOn = (t) => { let opts = {}; let x = t.get('left'); let y = t.get('top'); if(x < 0){ opts.left = 0; } if(x > pWidth){ opts.left = pWidth; } if(y < 0){ opts.top = 0; } if(y > pHeight){ opts.top = pHeight; } t.set(opts); }; let tokens = findObjs({ type: 'graphic', pageid: pid }).filter(outside); tokens.forEach(moveOn); let fixed= tokens.length; sendChat('RetrieveTokens',`/w "${who}" <div>Fixed ${fixed} tokens.</div>`); } }); });