
I am in the process learning the ins-and-outs of the how the API works. Am I correct that a given API script runs globally across all pages in a campaign rather than as a separate instance on an active page? If so, what would be the correct format for creating a process that performed a series of subprocesses as it iterated through each separate page in the campaign? Specifically I am working on a modified version of the Inventory Manager script (based on John C.'s original through Rouby's modifications). I am looking for an alternate to this line: var pageGraphics = findObjs({ _pageid: Campaign().get('playerpageid'), _type: 'graphic' }); which restricts the functionality of the script to the page with the Player Bookmark. Working off the model of the current script: var pageGraphics = findObjs({ _pageid: Campaign().get('playerpageid'), _type: 'graphic' }); _.each(pageGraphics, function (graphic) { I am experimenting with using the following to wrap the page-level functionality of the script, but have not been able to format/place it correctly to produce the results I want: var pageEach = findObjs({ _type: 'page' }); _.each(pageEach, function (page) { The original line tying the script to the Player Bookmark would then become (I think): var pageGraphics = findObjs({ _type: 'graphic' });
_.each(pageGraphics, function (graphic)
{ Let me know if seeing the totality of my current draft script would help. Thanks for any thoughts.