Obtaining the URL of an embedded PDF: We use the Control statement in an InputScript to display an HTML page as a popup window. The HTML page then displays a PDF file where the URL depends on various conditions. Is there a way to obtain the URL of the displayed PDF in a GuiXT variable?
Yes, this is possible. Use the following example:

InputScript:

Control (4,4) (20,120) name="pdf1"

progid="file:///C:\pdftest\pdflink.html" title="PDF link" -floating

CallVBS pdfsrc = "get_pdf_src" "&V[pdf1]"

V[pdfsrc] now contains the final PDF URL.

 

VBScript:

Function get_pdf_src(ie)

' wait until document is loaded

Const READYSTATE_LOADING = 1

Do

guixt.DoEvents()

Loop While ie.ReadyState = READYSTATE_LOADING

Set pdf = ie.Document

' return URL

get_pdf_src = pdf.src

End Function