We are having a prank competition at the office, and we are only allowed to use Python.
the prank involves: taking a screenshot of the Desktop, Moving all the Apps from the Desktop, and using the screenshot as the new wallpaper (I Hope U got it).
The issue is I'm not able to make the taskbar disappear, so they can open the Apps with the taskbar.....
I need a way to hide the taskbar (in any way or form)
TNX
nircmd.exe win hide class Shell_TrayWnd
nircmd.exe win show class Shell_TrayWnd
try running with subprocess in python
Related
I used pyautogui and PIL to capture screenshot after clicking on battery icon. But the screenshot doesn't contain battery status window. When I use print-screen key, status window is available in the screenshot. Need suggestions to solve this.
You can use greenshot opensource tool for windows, using hotkey you can take almost anything as a screenshot.
I think PrintScreen is best for taking screenshots on windows 10. But if you want to use any third-party apps for taking screenshots then pick-pick is a free and good app. It also allows you to take a fullscreen screenshot.
GNOME Developer Center website shows About Dialog without an icon. On Ubuntu 16.04 LTS however, it seems that GTK now requires for icon to be present, as without explicitly declaring icon name, that very same example form the website it shows error icon.
Thus the question: how do I get around this issue ? I want the About dialog for my program only have simple text and no icon/logo.
I know I'm a little late to the party but I just stumbled upon your question because I was too searching for an answer to this. What worked for me was this:
about = Gtk.AboutDialog() # Create your about dialog object
about.set_logo_icon_name(None)
By passing None to set_logo_icon_name the default window icon set with the gtk.window_set_default_icon_list() function will be used. If you haven't specifically specified a default window icon then no icon/logo will be rendered.
i am using python/tkinter to write a IM software on XP. now i've got all the main functions done except i don't know how to highlight or change colour my IM item on taskbar on windows xp when window is minimized to the taskbar when a new message is received. i've search for this but just got c# solution. i need help on python. thanks!
I needed to do this for a tkinter python slack client I am writing and found http://wiki.tcl.tk/1049 . After a bit of guessing, I found that
Tk().deiconify()
Tk().focus_force()
(i.e. on the root window) does the trick. Windows doesn't actually change the focus and show the window since applications are not allowed to do that (Windows after XP) but it flashes the taskbar instead. It will keep flashing until clicked on but that seems to be the behaviour of Skype/Slack etc. Certainly close enough for many uses.
Obviously this is an old question but I couldn't find a concise, python only, answer and still needed one!
I'm not sure if there is a good way of doing this with Tk. Maybe somebody more knowledgeable will be able to point you in a better direction. Since Python is so dependent on OO, you may have a difficult time writing bindings to the Windows window manager.
If you don't find anything else, I did stumble on http://wiki.tcl.tk/4089, which manages Windows icons on the taskbar. Perhaps you could utilize this to simulate the taskbar flash that you want?
My application has "Bring to current desktop" option in indicator menu. Now, moving windows across workspaces is nice and easy if you are not using Compiz.
My question is how could I bring application window to current desktop. Application is written in Python and GTK+. I tried using Present method of gtk.Window but then window grabs focus and nothing else happens (window is not actually presented to user). I also tried playing with wnck, but that method works only when Compiz is not running.
Any idea?
I'm writing a webmail checker in python and I want it to just sit on the tray icon and warn me when there is a new email. Could anyone point me in the right direction as far as the gtk code?
I already coded the bits necessary to check for new email but it's CLI right now.
You'll want to use a gtk.StatusIcon to actually display the icon. Here are the docs. If you're just getting started with gui programming you might want to work though a bit of the pygtk tutorial.
This http://www.pygtk.org/docs/pygtk/class-gtkstatusicon.html should get you going.