question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to select menu item from popup menu in Sublime Text

See original GitHub issue

I can automate right click on an empty file opened on sublime. But once I get the menu from the right click I cannot seem to select any of the options like Paste or Open containing folder shown on the menu n Sublime.Any way I can do that?

Need access/focus/control of that popup menu before I choose the option I want to click. Struggling to achieve that. Any help be appreciated. Thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
airelilcommented, Jan 6, 2019

@sarora, as per example in my previous comment:

sublime.PopupMenu.wait('ready').menu().get_menu_path('Paste')[0].click_input()

A similar code, even though it talks about system tray, can be found in our docs: https://pywinauto.readthedocs.io/en/latest/HowTo.html?highlight=menu#how-to-access-the-system-tray-aka-systray-aka-notification-area

0reactions
vasily-v-ryabovcommented, Jan 20, 2019

Hi @sarora I see that @airelil’s code is also working on my PC. So the suggestion was to enable logging that will show click coordinates. Also .rectangle() for the menu item could be printed to compare with logged coordinates. If they are not matched, please report again and re-open the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is Sublime Text context menu disabled (image below)
Menu items appear disabled for a couple of different reasons. The first (and most common) is that when a menu is about to...
Read more >
SOLVED: Menu bar present but no drop-downs visible
The problem is that clicking on the menu bar results in the selected menu item turning blue-background, and then, nothing. I cannot seem...
Read more >
I need to create a unique popup menu that I can use ...
I am currently looking for a way to create a unique context_menu that does not rely on any of the default .sublime-menus menu...
Read more >
[SOLVED] How to show the menu back? - Sublime Forum
Press ctrl+shift+P to bring up the command selector; Type “theme” and select “UI: Select Theme”; Try a different theme to the one you're...
Read more >
How to add/remove a default menu entry when a X package is ...
On the default Sublime Text Context.sublime-menu file there is this line, which only show on the real menu, when Goto Definition command is ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found