Access context menu of selection, not under cursor

Is there an action that selects an item from the context menu of whatever is currently selected? Somehow I can only find one ("Trigger Context Menu Item") that does it for whatever is under the cursor.
(I want to create a Touch Bar button to share with AirDrop)

in windows add
share;airdrop;"

I want this so badly too. The thing is that macOS opens the context menu only with a right klick. There is literally no way to get it with a keyboard shortcut and I didn't find any scriptable solution yet :confused:
Worth to look into it after the exams though :ok_hand:t3:

I modified a script to do this, but I run into a slight delay issue when selecting the option from the context menu. The script immediately opens the Share menu, but it waits 6 seconds before it selects AirDrop. Not sure why. I modified the AirDrop button in the Selection button on BTT to run this script and it works. I can't find another better option for this at this time.

AirDrop Script.zip (2.1 KB)

I was able to get rid of the context selection delay by removing that part from the script and adding keystroke triggers into BTT (down arrow (to highlight AirDrop) followed by return (to select it)". Now it works almost instantly! Add a delay of 0.15 between each trigger though to allow the menu to open.