apple script to java script...
Hi everyone,
As i want to change below apple script code to java script. I have tried upto duplicating the frames with java script and its working fine. But i don't know how to use whose condition in javascript. If it is possible to do whose condition in java script then i don't want to go for loop. Can anyone look into this and help me out.
-----Apple script-----
set xx to {}
tell application "Adobe InDesign CS3"
tell document 1
repeat with i from 1 to (count of text frame)
if class of parent of parent of text frame i is not in master spread then
set end of xx to id of text frame i
end if
end repeat
duplicate (every text frame whose id is in xx)
delete (every text frame whose id is in xx)
end tell
end tell
//---Java script---
var doc=app.activeDocument;
var myFrames=doc.textFrames.everyItem();
myFrames.duplicate();
//----
Thanks in advance
Thiyagu