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
  Regex to catch what user has put in text box robertkwild 26 5,906 Jun-26-2024, 01:06 PM
Last Post: AdamHensley
  mouse move event/cinfiguration ttk/python janeik 4 3,612 Jul-03-2023, 05:30 PM
Last Post: deanhystad
  Non repetitive mouse click Sartre 5 3,486 Apr-22-2023, 06:46 PM
Last Post: deanhystad
  try catch not working? korenron 2 1,697 Jan-15-2023, 01:54 PM
Last Post: korenron
  how to mouse click a specific item in pygame? Frankduc 5 3,085 May-03-2022, 06:22 PM
Last Post: Frankduc
  Multiprocessing queue catch get timeout Pythocodras 1 4,769 Apr-22-2022, 06:01 PM
Last Post: Pythocodras
  help with python mouse script z4rxxxx 0 1,701 Jan-15-2022, 04:39 PM
Last Post: z4rxxxx
  twisted: catch return from sql wardancer84 0 1,990 Sep-08-2021, 12:38 PM
Last Post: wardancer84
  Python graphics kaltenherz 1 2,404 Sep-05-2021, 05:19 PM
Last Post: jefsummers
  how to catch schema error? maiya 0 2,710 Jul-16-2021, 08:37 AM
Last Post: maiya

Forum Jump:

User Panel Messages

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