Python Forum
Python catch mouse click in pure text, no graphics
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python catch mouse click in pure text, no graphics
#7
Thank you for your reply.
The suggested works perfectly, but unfortunately it does not fully resolve my problem. I need the click to be within the while loop.
I have a while loop that runs by reading records (time and data) from a file. In normal mode ('auto') I want it to run until file ends, with the option to run each record by mouse click.

Here is a simplified snippet of what I actually need, and am unsuccessful in achieving.

class Convert():

    def __init__(self):
        while dataCounter < 100:
         if auto == 0:
              runTime = 0  
         # runTime = 0 will hold the next if and while loops and will wait for mouse click 

         if runTime >= dataTime or MOUSE_CLICK:

             do something................(sending data by I2C to a slave).

             dataCounter += 1
Reply


Messages In This Thread
RE: Python catch mouse click in pure text, no graphics - by samtal - Sep-08-2018, 10:51 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  mouse move event/cinfiguration ttk/python janeik 4 1,130 Jul-03-2023, 05:30 PM
Last Post: deanhystad
  Non repetitive mouse click Sartre 5 1,474 Apr-22-2023, 06:46 PM
Last Post: deanhystad
  try catch not working? korenron 2 878 Jan-15-2023, 01:54 PM
Last Post: korenron
  how to mouse click a specific item in pygame? Frankduc 5 1,769 May-03-2022, 06:22 PM
Last Post: Frankduc
  Multiprocessing queue catch get timeout Pythocodras 1 2,375 Apr-22-2022, 06:01 PM
Last Post: Pythocodras
  help with python mouse script z4rxxxx 0 1,155 Jan-15-2022, 04:39 PM
Last Post: z4rxxxx
  twisted: catch return from sql wardancer84 0 1,549 Sep-08-2021, 12:38 PM
Last Post: wardancer84
  Python graphics kaltenherz 1 1,742 Sep-05-2021, 05:19 PM
Last Post: jefsummers
  how to catch schema error? maiya 0 1,887 Jul-16-2021, 08:37 AM
Last Post: maiya
  is this a good way to catch exceptions? korenron 14 4,762 Jul-05-2021, 06:20 PM
Last Post: hussaind

Forum Jump:

User Panel Messages

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