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?
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.
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.
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.
Copy link to clipboard
Copied
That should do what you want. yes.
Copy link to clipboard
Copied
Great! 🙂 I am facing another problem here: https://forums.adobe.com/message/8685352#8685352 Can you please help in this?