Save "Track Mouse Coordinates" in "WinBatch Navigator"

Started by MAlvis, March 25, 2016, 09:09:00 AM

Previous topic - Next topic

MAlvis

Some tools in WinBatch Navigator, such as "Window Information" include the capability to save the data revealed by the tool as a WinBatch entry. However the "Track Mouse Coordinates" tool does not offer this capability, routinely an obstacle to capturing the information for use in WinBatch scripts.

Please add to the "WinBatch Navigator" > "Track Mouse Coordinates" tool , the capability to save the data identified either to the Windows clipboard.

td

Please see the MouseCoords button in the Consolidate WIL Help file.  Also  the WinBatch Navigator source script in the WinBatch System directory.  The file is called 'default.wbt'.   You can either modify it directly or copy the relevant section to make your own version.  Search on 'Track Mouse Coordinates' to find the relevant section in default.wbt.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

From default.wbt

Code (winbatch) Select
      Message("Mouse Tracker","This selection shows current mouse co-ordinates")
      BoxOpen("Mouse Tracker","")
      WinPlace(100,700,900,900,"Mouse Tracker")
      While 1
         ;debug(1)
         childwin = MouseInfo(0)
         parentwin = MouseInfo(1)
         If childwin == parentwin Then childwin = ""
         If childwin != ""
            If !WinExistchild(parentwin,childwin) Then childwin = ""
         EndIf
         xy = MouseCoords(parentwin,childwin)
         a = MouseInfo(2)
         x = ItemExtract(1,xy," ")
         y = ItemExtract(2,xy," ")
         mmove = StrCat('MouseMove( ',x,', ',y,', "',parentwin,'", "',childwin,'")')
         BoxText(StrCat("MouseMove Info",@CRLF,mmove,@CRLF,@CRLF,"Hold shift key down to exit"))
         ;TimeDelay(0.5)
         If IsKeyDown(@SHIFT) Then Break
      End While
      BoxShut()
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade