OLE Query to determine file path

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
Jano
User
Posts: 4
Joined: Tue Feb 26, 2019 3:26 pm

OLE Query to determine file path

Post by Jano »

Dear community,
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
How could I query the pdf at display in order to obtain the file path which could be copied to the clipboard. I am open to any solution.
Thank you for your thoughts,
Janosh
Post Reply