[comp.sys.amiga.tech] Intuition Impersonation

wmark@cory.Berkeley.EDU (Mark Williams) (02/23/89)

I was wondering if I could get a little feedback on this...

I have started to write a program which basically opens a message
port for ARexx messages and reads in commands.  These commands can
be window selection commands, mouse event commands, keybord event commands,
menu event commands, and the like.  I am trying to make it possible to
control programs which do not support ARexx by sending Intuition messages
to windows, i.e., pretending to be Intuition.  For example, this program
would allow a user to control a paint program through commands such as
'MOUSE DELTA 5 -5', 'CLICK LEFT DOWN', etc., sent through the ARexx port.
I would like to know two things:

1)  Is sending Intuition messages to windows whose associated tasks aren't
aware of it considered "nice"?

2)  Is there an easier way to accomplish this than essentially rewriting
the Intuition code which formulates these messages depending on the IDCMP
flags for the given window?  I want to be able to allow the user to retain
control of the keyboard and mouse while the window(s) receive the event
messages, so I don't want to take an approach like that taken by "journal".

Any help would be greatly appreciated.  Thanks.

---------------------------------------------------------------------------
Mark Williams            wmark@cory@ucbvax  

All expressed opinions are mere conglomerations of recorded sensual data
with frequent occasions of random inaccuracies.

"Sometimes the light... can play tricks on the *eyes*..."

  -- Balding, country sheriff to distraught heroine in all bad horror
     movies since the dawn of time
---------------------------------------------------------------------------

jimm@amiga.UUCP (Jim Mackraz) (02/23/89)

In article <10233@pasteur.Berkeley.EDU> wmark@cory.Berkeley.EDU.UUCP (Mark Williams) writes:
)1)  Is sending Intuition messages to windows whose associated tasks aren't
)aware of it considered "nice"?

Nope.  Count on it.

It IS acceptable to feed input via the input.device and hope for the
best.  You are not permitted to second guess the Intuition state machine.
You could conceivable mix your input with the user input, but it will
be funny.

)2)  Is there an easier way to accomplish this than essentially rewriting
)the Intuition code which formulates these messages depending on the IDCMP
)flags for the given window?  I want to be able to allow the user to retain
)control of the keyboard and mouse while the window(s) receive the event
)messages, so I don't want to take an approach like that taken by "journal".

It's even harder than that, of course.  You need to know a lot about the
window ( whether it's active, whether requesters are up, menus are active, ...).
You have to feed keystrokes down the input food chain for the console if
the RAWKEY IDCMP isn't set.

)Any help would be greatly appreciated.  Thanks.

How about advice: have fun experimenting, but don't expect anything like
robust results.  This is a dead end.  I don't think the phrase "open
software architecture" goes quite this far.

)Mark Williams           

Hi there; loved your unix clone ...

	jimm
    "The Intuitive Guy"
-- 
Jim Mackraz, I and I Computing	   	"Like you said when we crawled down
{cbmvax,well,oliveb}!amiga!jimm          from the trees: We're in transition."
							- Gang of Four
Opinions are my own.  Comments are not to be taken as Commodore official policy.