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

Re: SendRawKey problems...

Expand Messages
  • Dennis K. Paulsen
    In your Win32::GuiTest import line (use Win32::GuiTest qw(...)), make sure your including SendRawKey and the appropriate tag (:ALL, etc.) to import the
    Message 1 of 4 , Mar 26, 2006
      In your Win32::GuiTest import line (use Win32::GuiTest qw(...)),
      make sure your including SendRawKey and the appropriate tag (:ALL,
      etc.) to import the VK_LMENU, etc. constants... Also make sure your
      using "use strict;" and "use warnings;"; which can help any
      developer a lot.... Also check out Win32GUITest.exe from the
      project website.. It creates a script from your interactions. Even
      though its in early stages and doesn't handle many control
      functions, it may help if your getting use to SendRawKey....

      Hope that helped.

      Regards,
      Dennis K. Paulsen


      --- In perlguitest@yahoogroups.com, Alex Morozov <inductor2000@...>
      wrote:
      >
      > Can you provide your sample code?
      >
      > > Hi all
      > >
      > > Been banging my head against this for the last 2-3 hours, and
      its
      > > driving me nuts.
      > >
      > > ActivePerl 5.8.6.<something>
      > > Win32 Gui Test v1.50.5 (install from ppd file)
      > >
      > > I cannot get SendRawKey to send *anything* to the active window
      (testing
      > > with Notepad right now). I want to be able to send Left Alt
      Down, Left
      > > Alt Up, but its not sending anything at all... nothing...
      > >
      > > I searched the archives and found:
      > >
      > > ===========
      > >
      > > For the ALT key, you could use
      > > Press: SendRawKey(VK_LMENU, KEYEVENTF_EXTENDEDKEY);
      > > Release: SendRawKey(VK_LMENU, KEYEVENTF_EXTENDEDKEY |
      KEYEVENTF_KEYUP);
      > >
      > > ===========
      > >
      > > and looked through the guitest.pm for the correct usage and any
      other
      > > tips I could find.
      > >
      > > I managed to get SetFocus() + SendKeys() working first time, but
      > > SendRawKey() is infuriating me :)
      > >
      > > Many thanks for your help!!
      > >
      > > Steve
      > >
      > >
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      > >
      > >
      > > .
      > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.