-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Announcement: I'm making a PyWinAutoUI (graphical) GUI with advanced features #906
Comments
Hi @enjoysmath nice to see efforts to extend pywinauto ecosystem. We're open to all new ideas and initiatives. Maybe it's worth telling you about our own efforts:
The second tool could be integrated into py_inspect GUI with some additions: single step recording, Undo/Redo and other recorded script editor features. It would be nice to discuss all these things with community. |
@vasily-v-ryabov I have already integrated PyInspect efforts into my code. Unfortunately, I'm new at github and don't know how to recover an old repository (because currently @vasily-v-ryabov Correct me if I'm wrong, but a simple google search turned up and I should use: https://github.com/pywinauto/pywinauto-sandbox/blob/master/sandbox/recorder.py I will look into using that in a separate thread first, and if it crashes my app, in a different process. |
Here's another screenshot showing progress: I was able to use the multiprocessing library and run the recording on a separate process. So sockets are used to communicate back to the GUI process. It's running without blocking the GUI and doesn't seem to crash anything now. Now just have to convert the events into code statements. I didn't use the I want to release the source (because I have to according to PyQt5 open source license) and sell binaries with a selected time period of updates + Jira user account on bitbucket issue forums. Not for much though, maybe $5-10 / license? The source code can of course be downloaded & run, but I would be relying on the fact that most people don't want to go through the headache of doing that. I'm hesitant to sell the software, since the backend library (pywinauto) was free for me to use, but on the other hand no one is giving me work, so... not sure what to do. |
No, sandbox repository is very very old! Please don't use it. |
Regarding selling the binaries... of course, you're free to use pywinauto core library for commercial purpose since all the licenses permit it. No problem about that. We can't sponsor this work as there are no donations from community last year. So I completely understand your wish. The only thing I take care of is a license of your source code. If it's GPL, we can't integrate it into pywinauto core library or into py_inspect. So we will have to re-implement it on our side. I prefer BSD 3-clause or MIT license, but in some cases LGPL might be OK. If you were so glad to provide pull requests to py_inspect repository, that would be really cool. |
Hope it's easy to clone @cetygamer 's fork repository and his branch with the recorder to try it out (just click at the source branch in the pull request #701). Feel free to ask me about the architecture of the recorder. |
Sorry for delayed replies. I have a good main job and we work remotely for this quarantine period. So I have no commercial interest for this project in nearest years. I will monitor this issue in a high priority order and can promise to reply once a day. So that you can spend your time in the most efficient direction. And thanks for all your efforts! |
@vasily-v-ryabov Thank you for all of your prompt responses! I'm not sure how to do a pull request for py_inspect. Also I totally broke up According to this FAQ: https://www.riverbankcomputing.com/commercial/license-faq According to this: https://www.riverbankcomputing.com/commercial/buy From your link I clicked on the 'Commits' tab and found these goodies: e1efd6a That looks like a lot of code to re-invent, so I'll try to put it into PyWinAutoUI. Found this which is even nicer: |
@vasily-v-ryabov It would be crazy to try to get that old code to work. I cannot seem to bring up that branch in TortoiseGit. So unless you can provide me with a zip file of or method of checking out code that would plug into the most recent version of pywinauto, that approach is ruled out. I am happy with a simpler approach that I can code from scratch (using latest release of pywinauto) and that will meet my needs. My end goal is a set of on-screen lessons using the apps Qt Creator, WingWare, and Chrome browser, and PyQt5. By this I mean the user is directed where to click, where to type etc (like bubble.is lessons). The lessons will be created using a "Create Lesson" feature of PyWinAutoUI. |
You can fork cetygamer/pywinauto repository to your GitHub account by pressing "Fork" and waiting for a few minutes. Then you can clone the repo like this (just replace "cetygamer" with "enjoysmath") in cmd.exe or in GitBash:
After the repo is cloned let's change working directory to it and try recorder:
Some steps might be not recorded with tracebacks in console because it is still prototype. For example, combo box actions is one of the complicated actions that were not finished. But some simple actions are recorded. Actions on side windows (not in the target app) are not recorded. |
@vasily-v-ryabov Thank you for helping with git and what to git. I've got it running and it's throwing some errors, probably because I'm using Python 3.8. I will get it through the errors. Question: why do they target a single application when doing the recording? I was able to do |
@vasily-v-ryabov should I work from cetygamer's or pywinauto's repo to get the recorder up-and-running again? |
@vasily-v-ryabov I'm not sure what to do next as far as getting this to work with the latest pywinauto. I'll assume I just fork pywinauto/pywinauto and begin manually migrating the recorder code over from cetygamer/pywinauto fork. I think this is a first step, as it would be weird to depend on both repositories and there would be conflicts involving the generated code. |
@vasily-v-ryabov I made minimal changes after copying over the UpdateI fixed that line by using Had to make a
because with all my changes made there were then two versions of a rectangle struct floating around. This will work with both versions of the rect. So instead of Update1I did I ran my PyWinAutoUI code and it crashes once with a weird error but upon running again everything runs as expected. I don't know if that was an environment fluke or what involving my IDE's setup. But anyway, everything seems to be working okay at least with my test case. Perhaps you could show me how to run tests on pywinauto so that I make sure I don't break anything. |
Was fixed in another branch: 201bd21 |
How did you find this out? |
@airelil I forked and cloned pywinauto/pywinauto so if it was fixed and atspi is the default branch, then why didn't my checked out code show that updated code? So, how would I bring in the changes to my code using git checkout? |
As I understand, you worked on a "recorder" branch that probably is quite behind the rest of the code. This is a complicated feature and the work on it has been done in parallel by other contributors. Usually, once the feature is stable enough it's merged into the main branch. Currently we have master as our stable branch and atspi as our development branch where we consolidate all upcoming features for the next release. To align with atspi branch you need to run "git merge", but at this stage with such a big difference between two branches (many files have been moved under different locations) it will require to resolve many conflicts in different areas of the code. |
|
@enjoysmath sorry I was unable to be near PC during the weekend. I'm going to merge |
I've almost finished the merge in my fork. Will push it to upstream when the tests are passed. At the same time it is useful to learn how to add remote repositories to the local clone and sync from another fork or from upstream: |
Well, the updated "atspi-based" branch in my fork looks in the same state as "master-based" branch: I've done for today. The tests are still having few failures. But I've pushed the branch to upstream as well. Can't promise to fix them quickly. But it's possible to send pull requests to this branch at least. ;) |
Regarding several applications monitoring... of course, it's possible. We didn't think in details about the whole mechanism, but we plan to implement spawning child processes detection in |
Not sure about dependencies between py_inspect and pywinauto. I thought it could be integrated so: py_inspect uses pywinauto as a package installed into Python. But temporary prototype could be implemented in the way you like. The command line recorder is planned to be a part of pywinauto repository to avoid maintaining versions compatibility between recorder and core library. |
This looks interesting to me, can I know how to use the code generator for pywinauto and how to run the pywinauto GUI @enjoysmath @vasily-v-ryabov @airelil The control types are UIA |
I tried like below C:\Python\Python37> I've python 3.7 64bit |
@jjbright Did you git the source code of that other repository? The recorder code is not part of this repo afaik. (See instructions again) |
@enjoysmath I followed the same steps as mentioned, so now I get ModuleNotFoundError
|
My end goal is to do on-screen lessons with overlayed arrows as done on bubble.is (and their set of lessons), but since I don't want to always be coding to create a simple enough lesson, I thought I should give PyWinAuto a GUI frontend that detects / records clicks in .py script format.
Here's a screenshot:
I'm assuming I should post back here when it's ready.
The text was updated successfully, but these errors were encountered: