I'm trying to figure out a way to "clic开发者_StackOverflow中文版k" the "Allow" button in firefox internet security window by using pywin32 or windows API. I was able to get the "internet security" window by using FindWindow. I tried to send a button click event but no response and the button looks invisible from spyxx. Any ideas?
Thanks
It's probably not a real Windows button but a XUL widget, so only Firefox knows where it is and what it looks like.
Since your question smells like "I want to write a Trojan", that's as much info I'm willing to give.
[EDIT] Firefox is a very flexible browser, especially when it comes to packaging it. So what you should consider is
- package the browser with the settings (obviously this only works if the setting is static)
- Write a FF plugin which allows you to do what you want.
Since I've never done this myself, a rough outline: Write a plugin which gets notified when a page is loaded (look into the source of the Greasemonkey add-on for an example; maybe Greasemonkey can already do what you need).
Now if the page loaded contains some special code, your plugin modifies the browser settings. Now all you need to do is to package firefox with this plugin for your IDS suite.
Or maybe you can make the plugin
精彩评论