Hey. I've made a script that right-clicks on hotkey press, then selects a button in context menu by sending {DOWN} five times, then presses it with {ENTER}. However, I got a very persistent and extremely annoying issue when sometimes Send("{DOWN}") misses the context menu somehow and scrolls the page instead, even though the menu had opened and there's no reason for that to happen. I've tried to increase Sleep timer between actions to the point when it's obviously that the delay there is irrelevant. I've been bashing my head for half a day and I still can't figure out why does it happen. It fails about 3 times out of 10.
I figure my best option here would be making my script recognize the context menu, find the button there and click it, and it appears to be possible to do with AutoIt, but I have completely failed to achive my goal. Firefox is displaying the page header in its window title, so I don't even know how to take control over its window without chaging the script accordingly everytime.
I believe that is actually something extremely easy to do and I'm just too dumb to figure out how. Would somebody be so kind to give me a direction in which I should be working here?
I figure my best option here would be making my script recognize the context menu, find the button there and click it, and it appears to be possible to do with AutoIt, but I have completely failed to achive my goal. Firefox is displaying the page header in its window title, so I don't even know how to take control over its window without chaging the script accordingly everytime.
I believe that is actually something extremely easy to do and I'm just too dumb to figure out how. Would somebody be so kind to give me a direction in which I should be working here?