Page 1 of 1

Screenshot window - command?

Posted: Sun Mar 05, 2023 1:11 pm
by coffey
Hi Rob, would it be possible for Push2run + IFTTT to take a screenshot with the command? Thanks

Re: Screenshot window - command?

Posted: Sun Mar 05, 2023 4:30 pm
by RobLatour
Thanks for the suggestion.

I thought I would take a quick look around to see if I could find a command line utility to do this (which Push2Run could just call). However, unfortunately, I could not find one.

There was one tool I tested out called GreenShot, which demonstrates how this might be a little more complicated than one might expect.
For example, what do you want the take a screenshot of: the current window, the entire screen, what if you have multiple screens? Also, where do you want the output to go: the clipboard, a special folder? What file format do you want it in?

Regardless, the good news is I have some of this code already written in another program I wrote ( a viewer for windows ), so I may just modify it to take the screenshot and build in a way for Push2Run to call it.

However, to start what did you have in mind in terms of what do you want the take a screenshot of, and where do you want the output to go?

Re: Screenshot window - command?

Posted: Mon Mar 06, 2023 4:42 am
by coffey
Thanks for the quick reply, Rob. Sounds promising. I was imagining that I would say e.g. Ok Google, activated screenshot. and it would take a screenshot of the current window. It would be quite sufficient if it was then saved to the Windows clipboard. If it could be set to save to a folder such as Download, that would be perfect.

Re: Screenshot window - command?

Posted: Mon Mar 06, 2023 9:50 pm
by RobLatour
Ok, well I have something working now - but at this point it only captures the entire primary window and puts it in the clipboard.

I also have code in place to capture only the active window, but its not working so I have some more to do with it.

Please let me know if you would like to try a beta when available.

Re: Screenshot window - command?

Posted: Tue Mar 07, 2023 3:28 am
by coffey
Thanks for the response, yes, I'll be happy to try it.

Re: Screenshot window - command?

Posted: Tue Mar 07, 2023 5:30 pm
by RobLatour
Ok, I have a beta available if you would like to try it:
https://6ec1f0a2f74d4d0c2019-591364a760 ... eta4_7.exe

Basically, it enables the 'keys to send' key
{PRTSC}

So with it, and as with Windows, you can send the key {PRTSC} to the Desktop to take a screenshot of the desktop (only the primary window is supported), and also as with Windows, with an active window available you can send the keys {ALT}{PRTSC} to take a screenshot of just the active window.

In both cases, as with Windows, the screenshot will go to the Windows clipboard.

I appreciate that you have said you would like this to go to file, but that brings on a bunch of other complexities, so let's start with the beta as it is now and see how that works. If needed, I could perhaps write another program to take screenshots and save them to a file.

Here are two example Push2Run cards that you use to test with:
print_screen_test.p2r
(501 Bytes) Downloaded 401 times
print_window_test.p2r
(512 Bytes) Downloaded 395 times
If you do decide to test with this, I would appreciate your feedback.

Re: Screenshot window - command?

Posted: Wed Mar 08, 2023 4:46 pm
by coffey
That's amazing! It works great. It makes my job so much easier. I'm disabled and this is a great program. Thank you so much.

Re: Screenshot window - command?

Posted: Wed Mar 08, 2023 11:06 pm
by RobLatour
Very glad to be of help.

I'll add this in the next release. However, I don't feel this one change by itself warrants a general release so I'll need to come up with some other changes to include as well :-)

Until then your welcome to continue to use the beta.

Cheers!