Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coordinates of selected text
#1
Hi Gintaras and QMers.

Please, any idea on how to get the absolute coordinates of a selected text, for example in any doc or web page? In a notepad, I was trying some code as indicated below.

Thanks for any help.

Macro Macro1473
Code:
Copy      Help
int hWndEdit=id(15 win("Untitled - Notepad"))

int selStart selEnd

SendMessage(hWndEdit, EM_GETSEL, &selStart, &selEnd)

int i = SendMessage(hWndEdit, EM_POSFROMCHAR, selStart, 0)

int x=i & 0xFFFF
int y=i >> 16

out F"x:{x} y:{y}"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)