Reputation: 477
How can I simulate a menu item selection for an exact menu item like for example, "New Note" ?
Upvotes: 1
Views: 196
Reputation: 1731
If you want to create a new memo then simply use the Invoke class and supply it with a MemoArguments object. Note that you can do this for other core BB applications beyond the memo application.
Invoke.invokeApplication(Invoke.APP_TYPE_MEMOPAD, new MemoArguments(MemoArguments.ARG_NEW));
If you want to actually click on a menu item in another application then you could try using the EventInjector class, although I don't know how well that will work for you. If it's a third party application that you want to control you probably won't have a lot of success.
Upvotes: 2