Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to manage with efficacy the mouse input...
#7
@Steve
I must answer to your question
Quote:As a logic exercise, *YOU* explain to all the rest of us how the original code would be *any* better than just taking the value at the end of that loop.  Run it through your mind however you want.  View it from every angle.  And then explain WHY you think that you need to get those values *inside* that WHILE loop and not after it's ran and did its thing?
at the first round I coded only the keyboard input, but the demo seemed me too plain
so I decided to add mouse input, while I was typing the code I choose to make a sub for clearing the mouse buffer.
When I was developing the mouse input into test SUB I need to get back the mouse input and boring to add other code (some few lines) I thought that in clearing mouse buffer loop I can get the input...it is already there,  yeah it is in a loop, but no optimization of resources and time were in my mind and project.
So I apologize for my bad coding habit (no optimization of resource, no time optimization, no global and clear starting project) but I was stunned by the so fast flow of actions leading to a stucking mouse input . 
WHY is better inner input loop than input at the end of the loop?
No reason except lazyness that brought me to the arising issue.

My learning here are
1 set better the project and then code
2  also if it seems increasing the time of coding, make it as better as you can, and avoid confounding code.
Reply


Messages In This Thread
RE: How to manage with efficacy the mouse input... - by TempodiBasic - 11-18-2025, 12:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Updating my Mouse/Keyboard/Buttons/Fields routine. Pete 36 5,541 04-03-2025, 11:26 PM
Last Post: Pete
  seperate input from multiple mice v0.54 graphic demo madscijr 1 707 06-21-2024, 01:12 PM
Last Post: madscijr
  read 2 or more USB mice on one PC - fully working with keyboard input madscijr 2 1,116 06-16-2024, 01:48 AM
Last Post: madscijr
  IT'S ALIVE! reading seperate input from multiple mice plugged into one PC v0.30 madscijr 1 799 05-26-2024, 04:14 PM
Last Post: madscijr
  Mouse Routines to Use and Hack TerryRitchie 3 1,211 08-15-2023, 12:11 AM
Last Post: grymmjack

Forum Jump:


Users browsing this thread: 1 Guest(s)