You have 2 ways of achieving that.

If you own the menu item, then you may move the code from the menu handler to a new method. Then, instead of invoking Command and colon in your code, you simply call the new method (you also call the new method from the menu handler so that the menu item does not break).

If you don't own the menu item or simply want to invoke a keyboard shortcut, then you'll have to use a technique not built-in RB. For instance, in MacOS X, you can invoke the "System Events" application. It's an application made especially for AppleScript, but, as you know, you can use AppleScript or Apple Events from RB.

Which one are you trying?

Le 19 févr. 07 à 04:18 Matin, Lennox Jacob a écrit:

Hello,
I would like to code a pushbutton to effect a menuitem Command and colon, how can I do that?
Thanks.
Lennox

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to