VXRexx & SendKeyString 
Author Message
 VXRexx & SendKeyString


   In the never ending quest to circumvent the lack of
batch processing in PMView, I am trying to write a VX
Rexx program that utilises 'SendKeyString'.

   I first should mention that I have successfully used
"Keyboard Plus" to run a keystroke macro, but I can
only get it to run one instance, i.e., I cannot get it
to run sequentially on many images.

   The problem here with 'SendKeyString', is that after
it opens the first child window, it either is locked or
the subsequent calls are not being sent to the correct
(child) window.

   The best thing about this is that I found fairly
comprehensive documentation for the call(s) on Hobbes
as "VXTECH02.TXT".

Here is a code snippet:
/*:VRX         Change
    call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
    call SysLoadFuncs

    Application = "S:\Applications\Tides\tide150\tide\Pictures\tides\vancouver_week_2003-07-21.gif"

    rc = SysOpenObject(Application, "DEFAULT", 1)
    call SysSleep 1
    call VRMethod "Application", "SendKeyString", "", "1"

say "RC was" rc
    call SysSleep 1

 ok = VRMethod( "Screen", "ListWindows", "window." )
 if ok = 1 then do
     do i = 1 to window.0
        w = word( window.i, 1 )
        if VRGet( w, "Visible" ) = 1 then do
            say VRGet( w, "Caption" )
    call VRMethod "Application", "SendKeyString", "", "{Tab}"
[more keystrings]

   What happens is the program successfully opens up
the application, and then uses the custom application
macro "1" to open up the Size/Stretch (child) window.
From there on, nothing happens unless I use the
keyboard or mouse to change the focus, but the child
windows will still not receive any keystrings.  If I
(inadvertently) change the focus to another unrelated
window, the program seems to execute the keystrings all
in the new window to completion.

   In the above code snippet, after I manually change
the focus, the VX Rexx console opens, and I get the
correct rc (1) and the "ListWindows" list with the
application on top.

   What can I do to try to get this code to run, either
by removing the lock, or by entering a correct child
<object> to send the keystring to?


Sun, 08 May 2005 09:30:28 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Start a VXRexx program from a VXRexx Program

2. Vxrexx & DB2/2

3. Vxrexx & DB2/2

4. Vxrexx & DB2/2 Ver 2.1

5. VXREXX & Bound containers

6. BUG with VXREXX V2.1a & EHLLAPI

7. ABC Templates @#$%^&*&&*&*!!!!!!


9. VXREXX truncates messages in MSGBOX

10. VXREXX PM only?

11. VXREXX PM only?

12. VXREXX or VisPro Rexx?


Powered by phpBB® Forum Software