Screenshot window - command?

Here you are welcome to discuss items of general interest related to Push2Run
Post Reply
coffey
Posts: 6
Joined: Wed Oct 19, 2022 5:18 am

Screenshot window - command?

Post by coffey »

Hi Rob, would it be possible for Push2run + IFTTT to take a screenshot with the command? Thanks
RobLatour
Site Admin
Posts: 1016
Joined: Mon Feb 19, 2018 11:43 am

Re: Screenshot window - command?

Post 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?
coffey
Posts: 6
Joined: Wed Oct 19, 2022 5:18 am

Re: Screenshot window - command?

Post 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.
RobLatour
Site Admin
Posts: 1016
Joined: Mon Feb 19, 2018 11:43 am

Re: Screenshot window - command?

Post 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.
coffey
Posts: 6
Joined: Wed Oct 19, 2022 5:18 am

Re: Screenshot window - command?

Post by coffey »

Thanks for the response, yes, I'll be happy to try it.
RobLatour
Site Admin
Posts: 1016
Joined: Mon Feb 19, 2018 11:43 am

Re: Screenshot window - command?

Post 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 860 times
print_window_test.p2r
(512 Bytes) Downloaded 837 times
If you do decide to test with this, I would appreciate your feedback.
coffey
Posts: 6
Joined: Wed Oct 19, 2022 5:18 am

Re: Screenshot window - command?

Post 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.
Last edited by coffey on Wed Mar 29, 2023 7:19 am, edited 4 times in total.
RobLatour
Site Admin
Posts: 1016
Joined: Mon Feb 19, 2018 11:43 am

Re: Screenshot window - command?

Post 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!
Post Reply