2

I would like to know if it is possible to minimise my python program to the system tray. Basically what it does is at every hour it takes a screenshot but I don't want it to stay on the task bar taking space. Could I make it go to the system tray area next to the clock but keep it running? I am not using tkinter or anything like that.

0

3 Answers 3

2

Since you are running on Windows, you may simply want to rename your script to have a .pyw extension, so there is no console window. If you try to make a system tray application, you will need to pick a GUI toolkit like you've suggested, and your simple script will become a LOT bigger and far more complicated.

Sign up to request clarification or add additional context in comments.

Comments

2

Seems like some rather helpful folk here...

I was curious myself, and am poring over this persons PyWin32 app which might help your cause, Matthew:

http://www.brunningonline.net/simon/blog/archives/SysTrayIcon.py.html

Comments

0

As opposed to having the program running continuously, why don't you use your system's scheduler? (Cron under *nix, Task Scheduler under windows). There might be a bit more overhead since it has to spin up Python each time, but it would be easier than hooking up a notification icon.

Since you refer to it as the task bar, I assume Windows. To have a notification icon, you would have to have a hidden window, with a running message pump, so Windows has somewhere to send messages to for the icon.

So, in short, much simpler just running a scheduled job.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.