Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 11 DEC 2019 01:09:39PM Joe Wesner wrote:

Hi all,

Is there a way to send keystrokes to an AREV window from OI?

I just tried to do some DLL wizardry by using FindWindowExA to grab the window handle by class name (since AREV window has no caption/title), but I can't get the handle, it just returns 0.

I want to have an OI Edit Table and when the user doubleclicks an entry, SHIFT+F1 is sent to AREV and the value of selection would be sent as key press events.

Wondering if I'm on the right path or maybe there is an easier way - like a reverse CTO function maybe.

Thanks.


At 11 DEC 2019 03:51PM bshumsky wrote:

Hi all,

Is there a way to send keystrokes to an AREV window from OI?

I just tried to do some DLL wizardry by using FindWindowExA to grab the window handle by class name (since AREV window has no caption/title), but I can't get the handle, it just returns 0.

I want to have an OI Edit Table and when the user doubleclicks an entry, SHIFT+F1 is sent to AREV and the value of selection would be sent as key press events.

Wondering if I'm on the right path or maybe there is an easier way - like a reverse CTO function maybe.

Thanks.

Hi, Joe. If you have complete control over the AREV routine, you might try the CTO_DIALOG_BOX or CTO_GUI_FUNCTION calls. When run inside an AREV32 window that's "hosted" inside OpenInsight, they can be used to invoke an OI dialog box or any OI function that requires a Windows UI. Maybe one or the other of these could work for you?

(Note that there are a whole bunch of CTO_xxxx functions, like CTO_POPUP, CTO_MSG, CTO_GUI_SUBROUTINE, CTO_SET_PRINTER, etc., that are designed to provide some "interaction" between the AREV/CTO form and OI.)

Hope that helps,

- Bryan Shumsky

Revelation Software, Inc.


At 11 DEC 2019 03:54PM D Harmacek wrote:

My systems interact between Arev32 and OI all the time. But, the starting point is always from Arev32 starting up something in oi using the CTO routines. Sometimes Arev waits for data to return via a single return variable from the CTO_GUI_FUNCTION.

But, it seems you want to be in an OI window and send some keystroke to Arev32.

Will Arev32 already by running? If so, then it is in a different oengine than you started. You may be able to start Arev32 and have the value on the command line.

I point out that Arev32 is emulating a DOS environment and thus doesn't receive messages from another program, unless it is sitting in a loop looking for it. I suppose you could program that, perhaps opening a DOS file that is written by the OI side. If you have a loop running be sure to invoke the yield() function in Arev32.

Dave

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/2fdddfff2efcf84480e70e703348416d.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1