I am or was used to extract the file path and the current page number of a PDF at display with the following AutoHotkey OLE script for further use in another application (citation).
Code: Select all
gApp := ComObjCreate("AcroExch.App")
gAvDoc := gApp.GetActiveDoc
gAvPage := gAvDoc.GetAVPageView
DocPageNo := gAvPage.GetPageNum + 1
gPdDoc := gAvDoc.GetPDDoc
JSO := gPdDoc.GetJSObject
JSO.Path
Thank you for your thoughts,
Janosh