I'm trying to automate the simulation workflow in ANSYS Workbench by using the built in journal recorder to record all the inputs and then make copies of the recorded code and run it multiple times. Everything works fine, but sometimes a window pops up in Fluent notifiying that the settings have changed and the user must confirm it before it continues. Sadly this window pops up randomly, so I would need to check for it's presence with some sort of IF sentence, but journal recording uses IronPython with a very strange (for me at least) syntax and I have no idea how to put together the IF sentence that would check the presence of this window.
The piece of code bellow confirms the pop-up window:
setup1.SendCommand(Command='(cx-gui-do cx-activate-item "Settings have changed!PanelButtonsPushButton1(OK)")')
Related
So I think the Sagemaker UI was updated very recently this week, and now I can't find any of my previous "runs" / "trials" / "jobs"...
When I go to home - Experiments, I can see the names of two experiments I have done in the past, but when I click on it, it just says "No runs / You don't have any runs". Not only did I have a bunch of runs / jobs (not sure if the term changed), but when I try to launch another one with my previously working script, it runs well (and saves itself well on S3) but doesn't show.
Anyone has the same problem ? Where should I turn to help ?
As part of those changes, automatically generated runs (previously called "trial components") are hidden by default.
On the "Runs" table for your experiment, click the cog icon in the upper right and enable "Show jobs". This will display any automatically generated runs in the table.
Apologies if this is a completely easy fix and I've just missed it. I am learning Python and I am trying to develop a GUI alongside my backend code using Tkinter. This is completely foreign to me and I have recently come across the problem that when I press my buttons there is a very small chance that it will make my window move behind all other open programs.
I am not entirely sure what is causing this but my guess is it stems somehow from one of two functions I have; one meant to minimise the main root window and the second to reveal it. However, these functions are not called in any place in my program that I would not expect them and the windows being minimised are not the root window (which my two functions act on).
I have both functions added below (hopefully, I am pretty new to SO) but if any additional code is needed I will supply it. I have quite a bit of code and everything else functions perfectly so I didn't want to post all my code is all.
There is no particular combination of button presses or buttons in particular which cause it, it appears to be any of them seemingly at random. It sends whatever window I have up to the taskbar.
def revealMenu():
root.update()
root.deiconify()
def hideMenu():
root.withdraw()
I'm using python 2.7.
I created a small program with appJar to create the user interface and packed it with Cx_freeze. It works fine on my computer and several other Thinkpads. But it acted strangely on several Huawei Magicbook(not everyone).All of those computers are using Windows 10. After I start the program on those computer, first the size doesn't appear correctly, and also some of the width setting appear differently.
This is my code of the UI size part, on some computer it looks smaller than "1000x600":
app=gui("Config Compare", "1000x600")
app.setResizable(canResize=False)
That's not the only problem, there are many buttons and checkboxes on the interface linked with a Textarea, the Textarea kept printing stuffs, it seems like, those buttons and checkboxes clicked themselves. I haven't touch anything, but it seems like something has went through every button on my interface again and again until I close the program.
Why will such thing happen?
I'm trying to develop a solver for good ole' Minesweeper, but running into a hitch.
Environment: I setup Python 3.4.6 (x64) and am using Pywinauto 0.61 and the old Windows 7 Minesweeper from Winaero's "Windows 7 games for Windows 10".
Problem: I can't seem to detect dialog items nor interact with them using Pywinauto, yet I can tell from inspect they are clearly there.
1) Minesweeper
2) Inspect.exe showing the process ID - which matches pywinauto's - and all relevant children
3) Results of Print_Control_Identifiers() on the window and the child. Lacking the children shown in 2)
My code is as such:
app = pywinauto.Application().connect(class_name="Minesweeper")
mswpr = app.window(title="Minesweeper")
mswpr.print_control_identifiers()
mswpr.child_window().print_control_identifiers()
After fiddling with this for hours, I'm still not sure what I'm missing. I expect to see a list of groups, a menu bar, and a title bar to appear in one of the outputs (given inspect's results): acknowledging they are recognized by pywinauto, yet I'm given nothing. I am sure the program is locating the right process and window, given the process ID and window dimensions match between inspect and pywinauto.
Suspicions: The first is that this, being a Microsoft product, is simply inaccessible through the traditional means of Pywinauto. Another idea is that I see conflicting UIA and win32 types, alternating between backends in Pywinauto yielded nothing. I've also attempted to directly access dialogs by name with the code I was able to determine via inspect.exe to no success. My question is, what could I be missing?
Thank you for any clues or suggestions.
I'm writing a program in curses and sometimes happens that if I leave the program opened and I use other terminal tabs for a while, when I go using the program again it seems like it has refreshed something and something has disappeared... I cannot show pics or screenshots because I haven't understood yet well when and how it happens... Is there a way to prevent or fix this?
screen.getch reads from stdscr, and if it refreshes (due to any change on the screen), will overwrite boxes. You could change that to box.getch, as I did in scroll page by page or line by line using python curses
The manual page for getch says
If the window is not a pad, and it has been moved or modified since the last call to wrefresh, wrefresh will be called before another character is read.
In your sample program you used
screen.keypad( 1 )
which only applies to reading from the standard screen. If you read from the box window, you should set the keypad flag on that:
box.keypad( 1 )
The manual page for keypad says
The default value for keypad is FALSE
that is, it is the default for each window.
A curses program with multiple windows can choose to read from different windows at different times. There is only one input buffer for each screen, but the side-effect of refreshing the current window makes it simpler to manage updates to the windows. (For complicated window stacking order, you would use the panel library rather than rely upon this side-effect).