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

Issue when opening documents.

Participant ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

I am opening a document by using:

F_ObjHandleT docId = F_ApiOpen(componentName, &script, &returnp);

I also have set the following property to the script:

IntT i = F_ApiGetPropIndex(&script, FS_MakeVisible);

script.val.propVal.u.ival = False;

I have an FDK client which scans all opened books and for each one I get all components.

I open all documents from each book (and later on flows, etc) in order to extract all text items from the documents.

Since I have FS_MakeVisible to False the FDK client does it transparently and the user is not aware of it.

However, when some documents are already open then whenever I try to open these the program switches to these (however do not open it again) and the user looses his focus on the active document.

Is there any way to check if a document by its name is already open or set some setting to not switch to it after is opened?

TOPICS
Scripting

Views

554

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

correct answers 1 Correct answer

Contributor , Apr 13, 2016 Apr 13, 2016

The Session has a property for the FirstOpenDoc, and then each document has a property for the NextOpenDocInSession. Iterate through these to get all open documents, compare their Names to the document you are about to open.

Votes

Translate

Translate
Contributor ,
Apr 13, 2016 Apr 13, 2016

Copy link to clipboard

Copied

The Session has a property for the FirstOpenDoc, and then each document has a property for the NextOpenDocInSession. Iterate through these to get all open documents, compare their Names to the document you are about to open.

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
Participant ,
Apr 13, 2016 Apr 13, 2016

Copy link to clipboard

Copied

Hmmmmm..... 🙂 So you say that I can firstly grap all the document names from the already opened documents (by iterating through FirstOpenDoc, NextOpenDocInSession, etc). And later on, when I will try to open all book components and open silently everything FS_MakeVisible False then I will skip the files that are already open? If this is the case I want to thank so much.

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
Contributor ,
Apr 14, 2016 Apr 14, 2016

Copy link to clipboard

Copied

That should do what you want. yes.

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
Participant ,
Apr 14, 2016 Apr 14, 2016

Copy link to clipboard

Copied

LATEST

Great! 🙂 I am facing another problem here: https://forums.adobe.com/message/8685352#8685352 Can you please help in this?

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