easygui CLOSE button (on top right of window) not functioning - python

i have created a chat system in python, using easygui for graphical user interface.
there are minimize,maximize and close button on top right of window,but the close button is not functioning at all.i just can use the exit button which i created to close the application. i had some search and found there is a problem with easygui, so is it totally impossible to fix this problem? or how can i remove that close button from top right as there is no use for it. its final year project and i'm afraid my advisor and supervisor want try that button and i lose mark because of no function
is there anyway to fix it or at least remove that close button?

This is likely past the due date for your assignment...sorry. But, that was a known limitation of easygui. An up-to-date version with a fix for that will be released soon. If you can't wait, you can take a look at it in development form: https://github.com/robertlugg/easygui

Related

Auto refresh window to using python

I would like to make a program for make my window refresh every 10 min. i'm new to programming and currently exploring python technology
My machine is connected with pc based software which will test the product
The software tend to be freeze and system hang-- we need to restart the pc to solve this issue
idea:
I want to make a python program to auto run and keep click refresh button every 10min
my idea is to keep window always ready to receive data
I just beginning to explore below code ( very simple)
import mouse
#left click
mouse.click("right")
mouse.wheel(-3)
# right click
mouse.click("left")
How do I access the "refresh" option on the right click?
is my idea in not particle?
Your question is very unclear, so I'm just guessing you are in a browser window and want to refresh the site (right?)
Using the mouse package to do so will be very hard, therefore I suggest you use the keyboard-package, which is even from the same author.
import keyboard
keyboard.send("F5")

WxPython exit button doesn´t always works

I am using a code designed by another person in MAC OS. I am using Windows instead and have slightly modified it, but the problem comes when using the GUI that is created.
I have already dealt with a similar issue with a slider. Once I pressed the slider, I couldn´t release it or press another button. I was forced to quit the GUI and start again. I solved it by changing the event command from EVT_COMMAND_SCROLL to EVT_COMMAND_SCROLL_THUMBTRACK. However I did not understand why it worked in MAC OS and does not work in Windows.
Now, I want to close the GUI with the typical cross inside the red button in the right corner of the window. I can do it if it is the first order I do in the GUI. If I first press any button or slider, the exit button does not work.
It made me consider if a major problem is hidden in the code which I am not seeing. I am new at wxPython, which is the module used in the code.
I just ask for your opinion and hope it is a basic error.
Thanks very much

Pywinauto find process window and focus it

My current situation is that I open a process, which opens in a random location (thats how this process works).
I have the process PID so I need to somehow focus this window, and move it to the center of my screen.
Im doing something wrong as I can't even set focus on that window... tried it with different apps and got the same result...
The way I select the window -
appl = pywinauto.application.Application()
appl.connect(process=824)
app_dialog = appl.top_window_()
app_dialog.Minimize()
app_dialog.Maximize()
##app_dialog.SetFocus() ##doesn't work aswell
##pywinauto.win32functions.SetForegroundWindow(app_dialog)## doesn't work
Thanks for reading :)
Can't say why it doesn't work with pywinauto...
Got it to work with win32gui as the answer here- Python Window Activation
long yet efficient ;)
Method app_dialog.set_focus() should work in pywinauto 0.6.2. If not, it might be a bug. Is your application publicly available somehow? I'd like to reproduce it on my side. Are you trying to activate a background window while you have modal dialog on top of it?
Second case is a wrong usage of SetForegroundWindow(...). It should give a handle, but you pass WindowSpecification object app_dialog. Right way is the following:
handle = app_dialog.wrapper_object().handle
pywinauto.win32functions.SetForegroundWindow(handle)

Get focus on tkinter program after pc is unlocked

I have a tkinter program written in python 3.3.3. I see myself in the need of making the the program get focus when the user unlocks the computer. I don't really know how to go ahead and start with this, users have a .exe version of the program that I created with cxfreeze. I f i need to modify the .py and create another .exe, that wouldn't be a problem.
After some research I found that one can use the ctypes module to lock the computer, but it's not very helpful because i need to know if it is locked or unlocked. I also saw commands from win32com, but i can't seem to be able to find a way to trigger a command when it gets unlocked.
What is the best way to get focus on my program after the computer is unlocked??
Any help is greatly appreciated.
I cannot answer this specifically for 'unlock' event (if there even is one in the GUI; I can't find one by cursory search.).
But I think the real answer is to change the question. Having a program simply take focus when user unlocks the display is very un-Windows-ish behavior. The Windows user expects to see the desktop just as s/he left it before the display was locked -- why does s/he want to see your program on top when unlocking, regardless of why Windows might have locked the display?
Maybe you want to recast your program as something that runs in the background and pops up a notification (in the notification area on the right side of toolbar) when it wants user to do something?

python drop down menu attached to the windows taskbar

I'm currently working on a timer application on python 3, basically is for you to keep track of how many time spend doing something. I'm in the part of the process where i need to create an interface probably with tkinter, with a drop down menu that lists all the things i need to keep track of (lets call those things "statuses").
Now, my question is, is there a way to add that the drop down menu with the statuses in the task bar on windows? so that a user does not have to go the interface and change status, but most importantly, the current status can be always on sight.
Is this even possible? If it is, I just need a few hints please! :)
Am not sure about adding a drop down menu to the taskbar icon(like the one you get with Microsoft lync taskbar icon to change status, hope u need something like this), but i would suggest(incase this helps) to add menu at right click over the taskbar icon.
wxPython might help.
see this article.
http://codeboje.de/MailSneaker-Part-3-SystemTrayTaskBar-Icons-with-Python-and-wxPython/
Hope this helps.

Categories

Resources