How about a flow that creates a temporary artboard in the specified region and selectObjectsOnActiveArtboard to select the contents?
/**
* @file select page items in the specified bounds using selectObjectsOnActiveArtboard
* @version 1.0.0
* @author sttk3.com
*/
(function() {
selectRegion(app.documents[0], [0, 0, 200, -200]) ;
})() ;
/**
* select page items in the specified bounds
* @param {Document} doc target document
* @param {[number, number, number, number]} bounds left, top, right, bottom
* @returns {Array<PageItem>} new selection
*/
function selectRegion(doc, bounds) {
var res = [] ;
var tempArtboard ;
try {
tempArtboard = doc.artboards.add(bounds) ;
doc.selectObjectsOnActiveArtboard() ;
res = doc.selection ;
} finally {
if(tempArtboard) {tempArtboard.remove() ;}
}
return res ;
}
... View more