开发者

Implementing a Windows script

Hi I would like to create a script which loads a program on my windows based computer, clicks on one of its buttons, and checks the data inside it (it gets its data from the web). Should I do that in C#? Any example out there?

The program contacts the web and displays information. I would like to get notified when t开发者_运维知识库hat data has changed.

UPDATE: I've learned that the application doesn't contact a web-service using Charles. This means I have to load the windows application, click the button and look there. How can I do such a thing? I know it is disruptive, and still I would like to do that.


You need to download Wireshark to see what http(s) the program is using.

And once you come to know about http(s) used, you can use the WebRequest and WebResponse classes for making request to the server.


The method you described in checking for changes is quite disruptive: the script you intend to write needs to load the program and clicks the button. The loading and clicking is enough to disrupt whatever you are doing when the script runs.

I suggest changing the method to access the web directly to check for changes, and only displays a notification (WPF or whatever method you are comfortable with) when the data changes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜