Run menu item : browser
Hello,
I have a menu entry for MENUITEM_BROWSER and i want to trigger this menu item programmatically. how can i do that ? thanx |
Re: Run menu item : browser
Where would you be triggering this from?
You can't programmatically invoke a menu item on another application from your application using the API's. You might possibly be able to use key event injection (simulating keys pressed), but you would then have to identify when the browser is in focus and it is appropriate for you to press ths menu item. My guess is that you are taking the long way around the block. What exactly is your use-case? |
Re: Run menu item : browser
I am using the code given bellow to run menu item when call initiated.
private void runMenuItem(String menuItemText) { Screen screen = Ui.getUiEngine().getActiveScreen(); Menu menu = screen.getMenu(0); for (int i = 0, cnt = menu.getSize(); i < cnt; i++) if(menu.getItem(i).toString().equalsIgnoreCase(men uItemText)) menu.getItem(i).run(); } but it's not working in case of browser. |
All times are GMT -5. The time now is 04:55 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.