I need to extract the weblink under the mouse cursor.
I looked at getting the name under the mouse cursor with this, although instead of the window name I need the weblink.
:Start
buttons = MouseInfo(0)
If buttons != 0
Display(1, "testing", buttons)
endif
If IsKeyDown(@ctrl) then goto stop
goto start
:stop
exit
and https://forum.winbatch.com/index.php?topic=1596.msg7743 (https://forum.winbatch.com/index.php?topic=1596.msg7743)
Please help.
Thanks
There is probably a better way, but here's one way, I don't like it though.
To get link under cursor,
press Shift. The system then does a right-click for you and
presses the down arrow 5 times, followed by pressing ENTER.
When you hear a beep, the link is on the Windows Clipboard
and you can paste it wherever you like. You could also use clipget to
get the link into a variable.
I don't know why, but MouseInfo seems to be needed for this to work. ::)
:Start
windowontop("",1)
WHILE @TRUE
If MouseInfo(0) != 0
Display(1, "testing", MouseInfo(0))
endif
If IsKeyDown(@SHIFT)
clicktype = @RCLICK
mouseclick(clicktype, 0)
sendkey("{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}~",.1)
beep
endif
If IsKeyDown(@CTRL) then break
ENDWHILE
RETURN
Thanks pguild for the code.
Works great for the most part, although infrequently it behaves erratically and then click the wrong dropdown
Not sure if anyone has another solution.
Not exactly what you are looking for but this works consistently with Firefox:
while 1
If StrIndex(MouseInfo(0), 'Mozilla Firefox', 1, @Fwdscan)
If IsKeyDown(@SHIFT)
mouseclick(@RCLICK, 0)
SendKeysTo('~Mozilla Firefox','a',.1)
endif
endif
if IsKeyDown(@CTRL) then break
TimeDelay(.01)
endwhile
It might give you some ideas.
Thanks Td. Yes this is a 100% consistent