Right Mouse Click on an Element

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
thomastthai
Posts: 18
Joined: 12 Mar 2020, 01:51

Right Mouse Click on an Element

Post by thomastthai » 10 May 2020, 02:26

I am able to use ComObjCreate("InternetExplorer.Application") to log into the web site and submit a form etc. Additionally, I've been able to use OCR to navigate on a web site.

CG Broken Link for safety Cookie uses Wistia video player. Right mouse clicking on the video player pops up a menu. Left mouse clicking on "Copy link and thumbnail" copies that info to the clipboard.
Wistia Copy link and thumbnail.jpg
Wistia Copy link and thumbnail.jpg (7.19 KiB) Viewed 347 times
I can do that using AHK and one of the OCR library. However, I'm looking for another way (not using OCR) to send a right-click to that selector and copy the info to the clipboard.

After the right mouse click, and that menu pops up, the HTML source is updated with <button> elements like below.

Code: Select all

<button scale="1" style="background: transparent; color: rgb(255, 255, 255); cursor: pointer; display: block; font-family: WistiaPlayerOverpass, Helvetica, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; padding: 6px 16px; text-align: left; text-decoration: none; white-space: nowrap; width: 100%;">Copy link and thumbnail</button>
A post on Stack Overflow showed some options for sending the right mouse click event via Javascript. That could be a starting point?

Thank you for any insight!

-Thomas

Return to “Ask for Help (v1)”