 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
owilsky
Joined: 08 Dec 2005 Posts: 9
|
Posted: Wed Jan 25, 2006 3:39 pm Post subject: How do I show a menu at current text cursor position? |
|
|
How do I show a menu at current text cursor position if e.g. the cursor is in an edit box in a form of the web browser?
I tried this, but doesn't work...
| Code: | ControlGetFocus c
ControlGetPos, X, Y, , , c
Menu menuname, Show, X+50, Y+50
|
Thanks for all help,
Oliver _________________ Oliver Kötter |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Wed Jan 25, 2006 3:45 pm Post subject: |
|
|
Please try your code with %% around c on the ControlGetPos command, and with this "Menu menuname, Show, % X+50, % Y+50 " _________________ Ciao
toralf  |
|
| Back to top |
|
 |
owilsky
Joined: 08 Dec 2005 Posts: 9
|
Posted: Wed Jan 25, 2006 3:49 pm Post subject: |
|
|
Thanks, but I already tried this:
| Code: | ControlGetFocus c
MsgBox %c%
ControlGetPos, X, Y, , , %c%
MsgBox %X%,%Y%
Menu menuname, Show, %X%, %Y%
|
But the msgboxes don't display anything. _________________ Oliver Kötter |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Wed Jan 25, 2006 3:56 pm Post subject: |
|
|
I guess it is due to the web browser, since I remember that these commands only work on GUIs not on web pages. Maybe you could use a javascript to get the position, but I don't know that for sure. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Wed Jan 25, 2006 4:16 pm Post subject: |
|
|
I didn't understood your question because you were talking about the cursor (following the mouse position) and not the caret (marking the current position in the text area).
toralf is right, I think that in most browsers, Web pages are just surfaces where the browser draws. In other words, they don't use classical Windows controls but emulate them, so window spies see only one big control, not the form controls.
Some tester programs (robots to test Web applications) can control such forms, but I think they actually use the browser API to do so at low level. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|