Author Topic: Mouse Info - Hover Location  (Read 23 times)

JTaylor

  • Pundit
  • *****
  • Posts: 893
    • Data & Stuff Inc.
Mouse Info - Hover Location
« on: July 14, 2018, 12:40:09 pm »
I know there are ways to translate coordinates from various types to Dialog Units but wondering if any of the current functions return Dialog Units for a control location when hovering over Dialog Controls?  Not seeing it but thought maybe I was missing something.   

If I am not missing something I think it would be useful if this was an option in WinBatch.   That is under MouseInfo() having an option where it would give me the mouse coordinates in Dialog Units so I can make a straight-forward comparison to the results from option 17 in DialogControlGet().

...and just thought of something else...if it had an option to return the Control Name that would be useful at times I think. 

Again, if this is already possible please point me in the right direction.  Thanks.

Jim

td

  • Tech Support
  • *****
  • Posts: 2505
    • WinBatch
Re: Mouse Info - Hover Location
« Reply #1 on: July 14, 2018, 11:00:47 pm »
Perhaps try Using some arithmetic on the output of the MouseCoords function.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


JTaylor

  • Pundit
  • *****
  • Posts: 893
    • Data & Stuff Inc.
Re: Mouse Info - Hover Location
« Reply #2 on: July 15, 2018, 02:58:47 pm »
Yes.  That is an option but was suggesting, assuming it wasn't available, the other as enhancements as it would, obviously, simplify some things. 

I opted for looping through the control variables and extracting the control type and name and then getting and comparing the button text with that from MouseInfo().   This seemed easier than finding the coordinates of the controls and converting that into something that would be comparable to the coordinates retrieved from MouseInfo().


Jim