• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

check whether the selected object present in back side or front side

Community Beginner ,
Jun 21, 2017 Jun 21, 2017

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

new1.png

this is bring front Image

new2.png

this is bring forward Imge

Thanks,

TOPICS
Scripting

Views

391

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 22, 2017 Jun 22, 2017

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Jun 23, 2017 Jun 23, 2017

Copy link to clipboard

Copied

LATEST

Moving to InDesign Scripting​ for further assistance.

Regards,

Om

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines