Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!xanth!ukma!tut.cis.ohio-state.edu!osu-cis!att!cord!nsw From: nsw@cord.UUCP (Neil Weinstock) Newsgroups: comp.sys.amiga.tech Subject: Re: Updating Intuition menus Message-ID: <682@cord.UUCP> Date: 1 Feb 89 15:10:09 GMT References: <5513@bsu-cs.UUCP> Reply-To: nsw@cord.UUCP (Neil Weinstock) Organization: The Flying Squid Patrol Lines: 23 In article <5513@bsu-cs.UUCP> jbwaters@bsu-cs.UUCP writes: [ ... ] >this possible? In effect I would like to create a fake menu event in my >program to itself. I do not think I can use the input device as I want this to >work even when my programs window in not the active window. > >If it is possible to do this, would it be possible to create a general set >of routines (ie FakeMenu(*window, event), FakeKeypress(*window, event) etc) >that would handle the task of faking an input event to another program. If so >I think this would make an interesting way for one program to control another. Hmm. This seems too simple to be correct, but why not just format a MENUPICK IntuiMessage and send it to the IDCMP port of the window in question? The only potential problem would be deallocating the message, since if you CloseWindow()ed before replying to that message then Intuition would deallocate your message, which might be a bad thing. However, if you always reply to all your IDCMP messages before CloseWindow()ing, then I can't foresee any problems at all. /.- -- .. --. .- .-. ..- .-.. . ... .- -- .. --. .- .-. ..- .-.. . ...\ / Neil Weinstock | att!cord!nsw | "One man's garbage is another \ \ AT&T Bell Labs | nsw@cord.att.com | man's prune danish." - Harv Laser / \.- -- .. --. .- .-. ..- .-.. . ... .- -- .. --. .- .-. ..- .-.. . .../