hi I m new to these python automating thing and I wonder how can I automate to iterate thorough different windows and how to behave with child windows and also iterate thorough different menus and submenus to choose one?
I maybe wrong so pls correct me but as far as I've understood:
'pywinauto' seems incomplete yet and also have problems with python version 3.8, 'ctypes' creation purpose seems for other things (like working with c++ written files and not perticularly for windows api), with 'win32gui' I can select a window by name and bring it front but I don't know how to go different menus and child windows, and don't know about the 'win32com' objects.
win32gui documentations seem incomplete and do not have descriptions for different functions like
http://timgolden.me.uk/pywin32-docs/win32gui.html
pls suggest sources and also a simple code to about how to get submenus open
thank U
btw with this code I can get application handle and menus by manually selecting them
import win32gui
import time
time.sleep(5)
hwnd = win32gui.GetForegroundWindow ()
hmenu1=win32gui.GetMenu(hwnd)
and with this I can bring it front
win32gui.BringWindowToTop(hwnd)
pls tell me how to open menus
btw these codes seem to get sub menus but don't know how to open menus with them
hmenu1=win32gui.GetMenu(hwnd)
hmenu2 = (win32gui.GetSubMenu(hmenu1, 2))
hmenu3 = win32gui.GetSubMenu(hmenu2, 5)
and I have no clue how to deal with child windows and how to select them or get their handlers
Related
Copying many files from several sources to several destination over our network using MS Access 2016. Can use SysCmd to show Progress Bar on status Bar. Can also show file copy counter as a msg on status bar via Application.Echo True, "msg". But neither is as informative or visually appealing as that used by Windows file copy progress bar. Have looked at several customized progress bars on forms. If I could develop each to show the same information and progress bar as the one used by Windows, it'd be fine. But I wonder if there's a way to call the one used in Windows from MS Access VBA. Thank you in advance.
As far as I know, the only way to achieve this is to create a custom COM library. Because the explanation is rather long, I will refer you to some resources (you will need some version of Visual Studio to create the library, and some experience with either C# or VB.Net).
You will want to call FileSystem.CopyFile in your library, with ShowUI set to AllDialogs (https://msdn.microsoft.com/en-us/library/ms127965(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb).
See http://www.geeksengine.com/article/create-dll.html for instructions how to create the library, and register it in Access.
When debugging legacy code that is thousand of lines long, I found myself having the issue of trying to know what's the program is doing in very specific parts, so I've been trying to write my own developer tool extension that does what I need specifically; basically I need something that give me access to this or similar (example):
chrome.developer.v8.onFunctionCall = function(context, fn, arguments){
log(context.process);
log(context.id);
log(context.declaration.url);
log(fn.name);
log(arguments);
}
Basically I need something that can do it similarly, it doesn't have to be exactly that; I haven't found anything like it in chrome extensions developer documentation.
I currently have a app that manages projects. The user sees a list of projects and can select one. They can should (it would be nice) be able to click a run button and have another app open. The parameters stored in the project they selected are populated into the second application. The issue I am having is firing the second application. runApp generates the following.
ui code line:
actionButton("RunProj", "Run"),
Warning in run(timeoutMs) :
Unhandled error in observer: Key / already in use
observeEvent(input$RunProj)
I would like to trigger the second app and pass in the location of the project directory I have looked at parseQueryString and still trying to figure out a way to include that. Maybe via a redirect?
Any suggests would be much appreciated.
Regards,
Rich
I'm not 100% sure if I understand your intention correctly but here is a few things I think you may want to think about.
In one project, if you want to run a few kinds of analyses, you may want to try navbarPage
If there are many different types of analyses, you may want to try shinydashboard
If you know the link to each app and you really want to add those "run" buttons, you can add a button manually in ui.R. I think you can write some codes in server.r to generate the link based on your database.
tags$a(href="the link to your apps", class= "btn btn-default", "Run App")
So I was using the neo4jrestclient, and I noticed that in the class of QuerySequece, there's a .to_html()function (https://github.com/versae/neo4j-rest-client/blob/master/neo4jrestclient/query.py)
However, when I try using it I get the 'Unable to display the graph or the table' error.
I haven't found a working example of it. I was wondering if anyone has gotten this working.
Much thanks appreciated.
The function .to_html() is a function that IPython uses in order to render rich content inside Notebooks. When running inside a Notebook, neo4jrestclient asks for extra information to the Neo4j server, so it can draw the actual graph returned. Therefore, if you try to run a query inside an IPython Notebook, a D3 graph should be rendered automatically.
from neo4jrestclient.client import GraphDatabase, Node, Relationship
gdb = GraphDatabase(url="http://localhost:7474")
gdb.query("MATCH (me)-[r]-() RETURN me, r LIMIT 10")
A running example can be seen in this gist. Although it's still a work in progress. I think that I could add an option to populate the needed fields in case you wanted to use the .to_html() outside the IPython Notebook. All you need to do is to make neo4jrestclient believe that it's running inside of one by modifying the function neo4jrestclient.utils.in_ipnb() making it to always return True. Let me know if you would use that feature and I will add it.
On the other hand, I am developing ipython-cypher, to have a better integration of IPython, Pandas, NetworkX, and matplotlib with Neo4j, but it's still in alpha.
Update: Now you can add data_contents=True to return the extra data.
results = gdb.query(query, data_contents=True)
Data will be in results.rows and results.graph.
I'm using NetBean's Compile on Save setting, and it's really handy when I'm editing a single file. But when I'm dealing with a pair of (or more) class files and am switching between the files, I have a problem:
The Task tab is nearly worthless since it is littered by HTML "error" messages(+) from many dozens of HTML files in the project that are generated by some external tool. The number of HTML errors swamps out any actual Java errors.
What I want is one of:
A way to tell NB to ignore the directory with the HTML files ("help").
A way to turn off HTML "errors" or even to specify HTML2.
A way to filter "Task" errors by file type, parent folder: all Java is under "com".
I've perused the settings and properties, but found nothing that helps.
<rant> Yet another reason I hate an IDE that use the "Take Everything in the Folder" approach.... </rant>
+ = The files are valid HTML but probably not XHTML. Plus, half the messages end abruptly, with something like: "Unexpected tag <TD> found, expecting one of
I found the answer, or at least one that works for me (NB 6.8, YMMV):
In the Tasks tab, click the filter button in the left,
Choose Edit...
In the Task List Filter dialog:
Click New
Enter a value for Name (such as "No Script Messages"),
Uncheck the Scripting Language Tasks option
Click OK.
If the filter doesn't work immediately, you may wish to close/open the Task window or Netbeans.
Hope that helps someone else.
You can go to Tools->options->Editor->Hint .
You can easily select the right options from there .
I want to use task list to only track my To Do list and It can be a real pain when Netbeans starts showing me #todos from included libraries and all sort of compile errors that I am not interested in. If your use case is like me (not interested in compile errors etc. in task window) then you can do following:- (Netbeans 7.1.2)
1) Tasks window | Right click filter | Edit
To edit the default filter.
Click default filter in left hand panel.
Right hand panel, under Type tab - un-check compile errors and issues
2) You can go to Tools | Options | Miscellaneous
Go to Tasks tab now.
Here you can add/remove the To Do strings that you want.
You can create your own custom todo string or make sure that only one of them is listed (what you use)
Now apply default filter and you will only see your #todo tasks. sane and sweet :D