I have recently been developing a tiny "mini-shell" program that
searches a "built-in" PATH environment variable for a named program - which
it then executes using the standard Gemdos Pexec(...) command. Of course,
in order to input the name of the desired program from the Desktop the
"mini-shell" has to be a .TTP (TOS-TAKES-PARAMETERS) application. This
already works fine with all programs that DO NOT use the GEM environment
(i.e. mouse active etc. etc.) - but I CANNOT get it to properly execute
any program that uses GEM. I should explain I have done all the "obvious"
things i.e. used VDI to open a Virtual Workstation, left cursor mode &
entered graphics mode ( v_exit_cur ) and "activated" the mouse with
graf_mouse(257,&dummy) BEFORE attempting the Pexec(...) command but NOTHING
seems to work. The PATH is searched OK and the program found - but when it
begins to execute and, say, presents a fileselector (with a visible mouse)
I then find that "clicking" the mouse produces NO effect AT ALL! - the mouse,
though visible, does not function. Of course, if I compiled my "mini-shell"
as a .PRG program, which immediately asks for the program name (and any
command line arguments there may be) then ALL WORKS WELL - but I would have
to write my own code to "parse" the input command line (as I could not use
argv and argc if I invoked the program by double-clicking from the
Desktop). Though not a BIG job - this seems a nuisance & a hassle to do
something which "ought" intuitively to be possible.
Am I missing out on something? - or, conceivably, I "might" be
attempting something which is impossible with current TOS operating systems.
I say this because I cannot remember seeing ANY .TTP program for the ST that
takes command line arguments and then proceeds to do "GEM-like" things using
the mouse etc. Further, as an experiment, I renamed a program that used
GEM e.g. the "excellent" GULAM.PRG (as a typical example) so that it ended
in .TTP i.e. GULAM.TTP in this case. Double clicking on it and, (of course)
entering NO arguments into its .TTP dialogue box, gets me in to GULAM and
allows me to do most things that don't require the mouse. However when I
tried to execute a GEM Program from GULAM - the normal command being:
it failed to work just like my small "mini-shell" failed (Mouse Clicking
fails to Fileselect etc. etc).
I'm sure there are experts out there that can enlighten me - either
by informing me where I'm missing out or confirming my suspicion that it
may be impossible (in the which case I will not "waste" any more time
"attempting the impossible")
Replies Please to: W. Alan B. Evans