//LookForFirstRGB-Image.jsx myDoc = app.documents[0]; myLinks = myDoc.links; for (oneLink = 0; oneLink < myLinks.length; oneLink++) { if (myLinks[oneLink].parent.space == "RGB") { selectIt(myLinks[oneLink].parent) } } // selectIt-function function selectIt(theObj) { myZoomFactor = app.activeWindow.zoomPercentage app.select(theObj,SelectionOptions.replaceWith); app.activeWindow.zoom = ZoomOptions.fitPage; app.activeWindow.zoomPercentage = myZoomFactor; }
//LookForFirstRGB-Image.jsx myDoc = app.documents[0]; myLinks = myDoc.links; for (oneLink = 0; oneLink < myLinks.length; oneLink++) { try { if (myLinks[oneLink].parent.space == "RGB") { selectIt(myLinks[oneLink].parent) } } catch(e){} } // selectIt-function function selectIt(theObj) { myZoomFactor = app.activeWindow.zoomPercentage app.select(theObj,SelectionOptions.replaceWith); app.activeWindow.zoom = ZoomOptions.fitPage; app.activeWindow.zoomPercentage = myZoomFactor; }