![]() |
| ||
| Simulating a mouseclick? Hey guys, is it possible to simulate a mouse click using x and y co-ordinates. And also could you have user input of a certain co-ordinate and it would click that specified co-ordinate? thanks. |
| ||
| Re: Simulating a mouseclick? I found a very neat sample of doing this: from ctypes import * It may be long, but it is one of the few examples I have seen that work with little hassle in Python. For your second question, I'd probably bind with gui. Follow the example here but it doesn't have to be right click: http://www.daniweb.com/forums/post598858.html |
| ||
| Re: Simulating a mouseclick? also, how would you use Tkinter with two buttons for example to save a .txt document all you have to do is click that button and it will make a prompt for the filename and save it. Thanks |
| ||
| Re: Simulating a mouseclick? If you're talking about mouse clicks in Tkinter, then you will want to check out the manual: http://infohost.nmt.edu/tcc/help/pub...er/tkinter.pdf OR in HTML format http://infohost.nmt.edu/tcc/help/pubs/tkinter/ http://www.pythonware.com/library/index.htm To get mouse clicks, check out the Bind method at the end of the manual. To handle file dialogs, check out the tkFileDialog module. Hope that helps, Jeff |
| ||
| Re: Simulating a mouseclick? thanks answered my question |
| All times are GMT -4. The time now is 9:24 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC