Copy link to clipboard
Copied
Hi,
I'm using indesign cs6. I want to check whether the selected object present in back side or front side using indesign scripting.
The following code I tried,
var mydoc=app.activeDocument;
var myFrame=mydoc.textFrames[0];
if(myFrame.bringForward()==true)
{
alert(true)
}
else
{
alert(false)
}
This is the code i'm trying it will be return either false value or undefined.
example Image
this is bring front Image
this is bring forward Imge
Thanks,
Copy link to clipboard
Copied
Scripting questions are best asked in the Scripting forum: InDesign Scripting
That said, checking the documentation shows that you are using the function wrong. object.bringToForward() does not return anything useful: Adobe InDesign CS6 (8.0) Object Model JS: SplineItem
If you want to know if a certain object is in front of another, check its z order. Here is a long and fairly complete earlier discussion on it: Re: Getting page items in correct Z-order
Copy link to clipboard
Copied