No Screenshots with SAVEAS

Discussions and Tech Support related to using the iMacros Component for .NET in your applications.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

No Screenshots with SAVEAS

by UnicornWrangler on Sat Jul 13, 2013 11:44 pm

Greetings:

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")


I placed these five lines of code in my .NET project . . .

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")


SAVEAS MHT and TXT both work, but for me BMP JPEG and PNG do not.

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.
Last edited by UnicornWrangler on Wed Feb 19, 2014 4:50 pm, edited 1 time in total.
UnicornWrangler
 
Posts: 5
Joined: Sat Jul 13, 2013 11:54 am

Re: No Screenshots with SAVEAS

by Tom, Tech Support on Mon Jul 15, 2013 5:27 am

Hi UnicornWrangler,

Are you checking the return value after you call iimPlay for attempting to save a screenshot? Is it returning success or failure, and what's the value?

I just tested it with the TakeScreenshot.iim demo macro that installs with iMacros and did not have any problem.

Please be aware that TYPE=JPEG is only supported in iMacros for Firefox.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: No Screenshots with SAVEAS

by UnicornWrangler on Mon Jul 15, 2013 7:16 pm

Tom:

I get the following error information:

Error Code: -1000

Error Text: Operation is not valid due to the current state of the object.

Image

UnicornWrangler
Last edited by UnicornWrangler on Sun Aug 04, 2013 2:52 pm, edited 1 time in total.
UnicornWrangler
 
Posts: 5
Joined: Sat Jul 13, 2013 11:54 am

Re: No Screenshots with SAVEAS

by Tom, Tech Support on Tue Jul 16, 2013 4:08 am

Please try the following test:

Run the TestComponent application (either VB or C# version) that installs with the iMacros Component for .NET, click the Play button and select the TakeScreenshot.iim demo macro that installs with iMacros. Let me know if this works.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: No Screenshots with SAVEAS

by UnicornWrangler on Tue Jul 16, 2013 6:11 pm

Tom:

I did as directed, and it worked, so I think there must be something wrong with some aspect of my project, which isn't your problem.

If I find out why I can't make screenshots I'll post.

Thanks for your help.

Unicorn Wrangler
UnicornWrangler
 
Posts: 5
Joined: Sat Jul 13, 2013 11:54 am

Re: No Screenshots with SAVEAS

by Tom, Tech Support on Wed Jul 17, 2013 1:46 am

Thanks for checking, and please do update this post with your findings! I'm sure it will help other users in the future.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: No Screenshots with SAVEAS

by UnicornWrangler on Sun Aug 04, 2013 2:07 pm

Tom:

I am happy to report that I can now take screenshots with the component.

The Issue:

Screenshots fail in .NET 4.0 and 4.5

How The Issue Happened :

I use Visual Studio 2012 which by default targets the 4.5 Framework.

How The Issue Was Resolved:

I started a new project with the 3.5 Framework and transferred the code block by block.

To prove it to yourself . . .

Open the test component project.

Change the target Framework from 3.5 to 4.0 or 4.5.

When you run the TakeScreenshot.iim macro it will fail with the errors reported above and shown below:

Image


UnicornWrangler
UnicornWrangler
 
Posts: 5
Joined: Sat Jul 13, 2013 11:54 am

Re: No Screenshots with SAVEAS

by Tom, Tech Support on Mon Aug 05, 2013 8:48 am

Hi UnicornWrangler,

Thanks for the update! This problem will be made irrelevant in a couple of weeks after we release a .NET 4 version of the component.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: No Screenshots with SAVEAS

by UnicornWrangler on Wed Feb 19, 2014 8:42 pm

And the end of the story . . .

Just so you know, the .NET 4.0 component is available and does take screenshots.

UnicornWrangler
UnicornWrangler
 
Posts: 5
Joined: Sat Jul 13, 2013 11:54 am

Re: No Screenshots with SAVEAS

by fastRSgold on Mon Nov 24, 2014 11:16 pm

It can be changing into any lotto business, if you do not function 14 hours each day, a week per week and look game playing for several years."According to Taylor, your

"heyday" of gamemaking has passed."There would be a prime in the 1990s where you could break open in the door of your author and you can have a contract,Inch Taylor stated. "You

blew your financial allowance anyway, and they dealt with this. Containing secured themselves thus restricted. Units are going to just strike the actual wall membrane.
https://www.mmo7d.com/
https://www.fastfifa15.co.uk/
fastRSgold
 
Posts: 4
Joined: Mon Nov 24, 2014 11:10 pm


Return to iMacros Component for .NET

Who is online

Users browsing this forum: No registered users and 1 guest

-->