Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mouse Autopilot
#11
(Nov-14-2016, 10:00 PM)nilamo Wrote: What's the script you're running?

I think yes, running 0.01 seconds and exit. The script is no waiting for my left mouse button. I try: python nilamo.py
Reply
#12
(Nov-14-2016, 10:25 PM)jakabgipsz Wrote: I try: python nilamo.py

What are the contents of that file?
Reply
#13
(Nov-14-2016, 10:35 PM)nilamo Wrote:
(Nov-14-2016, 10:25 PM)jakabgipsz Wrote: I try: python nilamo.py

What are the contents of that file?

Only this:

try:
    from pymouse import PyMouseEvent
 
    class event(PyMouseEvent):
        def move(self, x, y):
            print("Mouse moved to", x, y)
 
        def click(self, x, y, button, press):
            if press:
                print("Mouse pressed at", x, y, "with button", button)
            else:
                print("Mouse released at", x, y, "with button", button)
 
    e = event()
    #e.capture = True
    e.start()
 
except ImportError:
    print("Mouse events are not yet supported on your platform")
Reply
#14
Get rid of the try/except. You want to see what the actual error is, instead of silently ignoring it.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Sending Emails on Autopilot Gyga_Hawk 3 1,673 Mar-15-2022, 08:20 AM
Last Post: Larz60+
  mouse 0.7.0 - mouse polling hate 125-1000hz penahuse 1 2,506 Dec-06-2019, 09:51 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020