[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Send a keystroke to Xy?



Typo: should be "loses its settings on calls to DOS"
And maybe I wasn't too clear about the problem. When an XPL program uses DOS/nv/x/z or DO/nv, after it exits back to Xy, what I see on the screen is messed up--I think remnants of what was going on in DOS are still showing. I can set the display aright by clicking on the icon at the top left corner of the window, then mousing over to "Re-load Settings." And I have set it up Autohotkey so that I need only hit alt-Enter to accomplish this via a macro. But, lazy me, I want the same XPL program that has the shell to DOS to signal Autohotkey to run that macro. And the only way to signal Autohotkey is by typing a keystroke (such as alt-Enter).

Thanks for your patience.
Hi. Due to the vagaries of Tame, which loses its settings only calls to DOS, I need to have an XPL routine that will send a keystroke that can be intercepted by Autohotkey.
That is, I now have an Autohotkey macro that moves the mouse to click on
the icon at the top of Xy's window, which invokes the Tame Console, and
then the macro sends "dl" which reloads the Tame settings from its
configuration file. That restores the display to the right state. But how
can I invoke the AHK macro without me having to enter a keystroke manually
to do so? I have tried compiling the AHK macro to an .exe file, but
whatever version of DO and DOS I use, it either doesn't activate the AHK
macro or doesn't produce reliable results.
So what I'd like is for an XPL routine--without any shelling to DOS--to
"send itself a keystroke" which AHK can then intercept, just as it does
when I type the "hotkey" on my keyboard.
I'm using alt-ENTER as the hotkey, so if an XPL program could make AHK
think alt-Enter has been typed, all would be hunky-dory.
I suppose this would be done by some kind of function call or equivalent
thereof, since function calls do things like move the cursor on the
screen. Just printing a keystroke to the screen is not an event AHK can notice.

Thanks for any ideas.