I am converting vb.net project from the scripting interface (V7.31.1339) to the .NET component. My project navigates a document management system which is password-protected and behind a pay wall.
To find out how much a given sequence of documents would cost to download, the project navigates to each the document, extracts the cost information, and takes a screenshot of the server's response to the document request. This works fine in the scripting interface, but I have not yet saved a screenshot with the .NET component.
This code works with the scripting interface . . .
Code: Select all
iim1.iimSet("BaseFileName", Trim(BaseFileName))
iim1.iimPlay("CODE: SAVEAS TYPE=PNG FOLDER=" & My.Settings.iMacrosDownloadPath & " FILE={{BaseFileName}}.png")
Code: Select all
iim.Play("CODE: SAVEAS TYPE=MHT FOLDER=C:\Unicorn\Output FILE=PacerPage" & vbCrLf & "WAIT SECONDS=1")
iim.Play("CODE: SAVEAS TYPE=JPEG FOLDER=C:\Unicorn\Output FILE=PacerPage" & vbCrLf & "WAIT SECONDS=1")
iim.Play("CODE: SAVEAS TYPE=PNG FOLDER=C:\Unicorn\Output FILE=PacerPage" & vbCrLf & "WAIT SECONDS=1")
iim.Play("CODE: SAVEAS TYPE=BMP FOLDER=C:\Unicorn\Output FILE=PacerPage" & vbCrLf & "WAIT SECONDS=1")
iim.Play("CODE: SAVEAS TYPE=TXT FOLDER=C:\Unicorn\Output FILE=PacerPage" & vbCrLf & "WAIT SECONDS=1")
I am using SAVEAS MHT in my project and it works just fine and that makes me happy but I'd sleep better if I knew how to get a screenshot instead.