In this article, you will find how to programatically click button of another application by using vb.net. It is using standard API calls, easy to implement. Contain Visual Studio project source file, demo example files.
Get start
Here is the preview picture of the VB application:
This small example app, I found from a tech forum, it`s very interesting, because you can use this tool to simulate other application button-click.
Deep dive
I studied the source code, and tried to find out how it works.
Start -> Refresh windows application -> Get the each app information -> Add to list box -> Select one -> Find all the buttons from selected item – > send simulative message.
Get the all the handles via API.getDesktopWindow(), And find the all the subset in it.
Loop all the single app, get the info, add in list item, and simlar principle to find the buttons in one app.
Please check the visual studio project source for more information.
Extension
From the prototype, we would develop more interesting and useful windows tool.
I did adapt it as timer-clicker, which control other windows app button with scheduled time, as daily running, since the original app which is controlled, does not contain this.
0 komentar:
Post a Comment