On 24 Dec 2015 14:55, "boB Stepp" <robertvst...@gmail.com> wrote: > > My Google-fu is weak on this question. I keep getting lots of hits on > web scraping, but my interest is actually as follows: > > I find myself doing the same boring, repetitive tasks by hand, which > amounts to copying certain information from one program and putting it > into other programs. None of these programs, to my knowledge, have a > publicly accessible API. Are there ways to programmatically > accurately click the right buttons (or check boxes, radio buttons, > etc.), copy desired fields and then switch to another program and > paste the desired information into the desired fields, accurately > clicking all things that need to be clicked, etc.? This is mostly a > Windows-based scenario, but if the techniques (if they exist) can be > abstracted to any OS I can find plenty of uses elsewhere as well!
This is certainly doable for Windows. You can make the mouse move and click on things, send keypress events. Look for Windows specific modules like pywin32 etc. I've done this from Python possibly using ctypes but I don't remember exactly. For OSX I think there's a policy that prohibits programmatic control of user interfaces. There will be solutions for all X11 systems (Linux etc) as well. Don't expect anything for all OSes but searching PyPI is probably worthwhile... ...I googled "Python windows control mouse" and got: http://stackoverflow.com/questions/1181464/controlling-mouse-with-python Also this: https://pypi.python.org/pypi/PyAutoGUI Which apparently does solve the problem for the main platforms (contrary to what I wrote above). -- Oscar _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor