Simple program to automate mouse and keyboard movements
Background:
I check my grades weekly online for school. I then use print-screen and ms paint to save images of the website with my grades. (I know this is really time consuming and inefficient, but my computer has connectivity problems with my printer and it doesn't recognize any PDF makers)
Possible Solution:
Write some program or something that automatically:
- ope开发者_如何学Cns a browser
- goes to the website
- logs in
- opens each individual subject
- creates an image (idc what process it uses to do so)
Thanks E'rybody
Don't use a browser. send Http requests in perl or something like that.
You can simply parse the HTML instead of grabbing screenshots.
Alternatively ask the school to provide your grades via email or on bloddy paper?
Personally I'd go with curl from the command line and then parse the html you get back:
curl http://website.com/grades
However, if you need to do it through a web browser (they might have some funky javascript) then there's a framework called selenium which might be usable: http://seleniumhq.org/
It's generally used for testing but can be used for your scenario. It's got clients for lots of different languages too.
精彩评论