Syntax - SEND_EVENT -] Menu (OpenInsight Specific)
At 16 FEB 2000 01:01:19AM Paul Rule wrote:
Can anyone tell me what the syntax is to select a menu item from another process as in val=send_event(ctrl,"CLICK"). I've tried various combinations with no luck.
At 16 FEB 2000 03:32AM Oystein Reigem wrote:
Paul
Do you mean something like this?:
RetVal=Send_Event( @Window : '.MENU.FILE.SAVE_ROW', 'MENU' )
In general:
RetVal=Send_Event( WindowName : '.MENU.' : MenuID : '.' : ItemID, 'MENU' )
Use Menu Builder (Menu | Design in Form Designer) to see which menu/item IDs to use.
In the above example I've used a menu item you get by default when you design a databound form (File | Save Row). But it works equally well on your own menus and items.
(And I've used the default IDs one gets for the File menu and Save Row item ('FILE' and 'SAVE_ROW'). But one can change the IDs in Menu Builder if desired.)
- Oystein -
At 16 FEB 2000 04:50PM Paul Rule wrote:
Thanks Oystein,
Thats what I was after.
I'd l'd left out the '.MENU.' after WindowName in
RetVal=Send_Event( WindowName : '.MENU.' : MenuID : '.' : ItemID, 'MENU' )
At 16 FEB 2000 05:27PM Oystein Reigem wrote:
Paul,
Funny. I had almost sent the reply when I decided to test my example after all and found I had made the exact same mistakeā¦
- Oystein -