Loading ...
Sorry, an error occurred while loading the content.

cursor arrow keys

Expand Messages
  • Philip Nemec
    I ve come across a program that only responds to the cursor arrow keys (not the num pad arrow keys). Unfortunately the num pad arrow keys seem to be the ones
    Message 1 of 3 , Jun 3, 2002
    • 0 Attachment
      I've come across a program that only responds to the cursor arrow keys
      (not the num pad arrow keys). Unfortunately the num pad arrow keys seem
      to be the ones that the VK_DOWN, etc. map to.

      Any ideas on how to send the other arrow keys?
    • erngui
      Hi, ... keys ... seem ... I ve done some investigation on this. VK_DOWN works for both types of arrow keys, but it looks like you app is also looking at an
      Message 2 of 3 , Jun 4, 2002
      • 0 Attachment
        Hi,

        --- In perlguitest@y..., Philip Nemec <panemec@y...> wrote:
        > I've come across a program that only responds to the cursor arrow
        keys
        > (not the num pad arrow keys). Unfortunately the num pad arrow keys
        seem
        > to be the ones that the VK_DOWN, etc. map to.
        >
        > Any ideas on how to send the other arrow keys?

        I've done some investigation on this. VK_DOWN works for both types of
        arrow keys, but it looks like you app is also looking at
        an "extended" flag to see if it is the numpad or not.

        The new version of Guitest I've just uploaded (1.49.2) has a new
        function called SendRawKey that should do the trick for you. I've
        also included and example script (eg/rawkey.pl):

        use Win32::GuiTest qw/:FUNC :VK/;
        while (1) {
        SendRawKey(VK_DOWN, KEYEVENTF_EXTENDEDKEY);
        #SendRawKey(VK_DOWN, 0);
        SendKeys "{PAUSE 200}";
        }

        Let me know if it works.

        Regards,
        Ernesto.
        --
        Ernesto Guisado
        mailto:erngui@...
        http://triumvir.org
      • Philip Nemec
        After some fiddling I got this to work. Yeah. :) What I needed was: SendRawKey(VK_DOWN, KEYEVENTF_EXTENDEDKEY); SendKeys( {PAUSE 50} ); SendRawKey(VK_DOWN,
        Message 3 of 3 , Jun 5, 2002
        • 0 Attachment
          After some fiddling I got this to work. Yeah. :)

          What I needed was:

          SendRawKey(VK_DOWN, KEYEVENTF_EXTENDEDKEY);
          SendKeys("{PAUSE 50}");
          SendRawKey(VK_DOWN, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP);
          SendKeys("{PAUSE 50}");
        Your message has been successfully submitted and would be delivered to recipients shortly.