Hoping to write simple screen capture + auto-email tool

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
Donny Bahama
In need of some credit
In need of some credit
Posts: 1
Joined: Mon Dec 08, 2014 2:32 am
Location: Margaritaville (a state of mind somewhere between Inebriation and Green Valley), AZ

Hoping to write simple screen capture + auto-email tool

Post by Donny Bahama »

I am an utter and complete noob with python and haven't even downloaded wxWidgets yet. I just want to be sure I'm barking up the right tree first...

I want to write a very simple, cross-platform tool that watches for the PrintScreen button to be pressed, then takes a (full screen) screenshot, saves it as (%temp%\ or /tmp/) screen.jpg then automatically emails it to a prespecified @ddress (either hardcoded or retrieved from an ini/cfg file) as an attachment, then deletes the temp file and displays a simple dialog, "Your screenshot has been sent."

Does wxWidgets have the necessary functions for me to make this happen?

Thanks for your time and consideration!
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Hoping to write simple screen capture + auto-email tool

Post by doublemax »

I don't know about wxPython, i can only talk about the C++ version.

There are two problems:

a) You can't catch the PrintScreen key in the background (if your application doesn't have focus) with wxWidgets methods. You'd need additional platform specific code for this.

b) There is no method in wxWidgets to send emails. There are external components like wxEmail, but i don't know if they're supported in wxPython.
Use the source, Luke!
Post Reply