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

RE: [perlguitest] Re: Sending keys to application thr scheduler

Expand Messages
  • Jangale V-S
    Hi, I tried switching between windows by using SendKeys( %{TAB}{PAUSE 1000} ); in a loop ! However program keeps on switching between first two windows only !
    Message 1 of 4 , Jun 20, 2002
    • 0 Attachment
      Hi,

      I tried switching between windows by using

      SendKeys("%{TAB}{PAUSE 1000}");

      in a loop !

      However program keeps on switching between
      first two windows only !

      How to make it switch thr all open windows ??

      Thanks in advance !

      With Best Regards,

      V.S. Jangale

      -----Original Message-----
      From: erngui [mailto:erngui@...]
      Sent: 2002-06-19 22:28
      To: perlguitest@yahoogroups.com
      Subject: [perlguitest] Re: Sending keys to application thr scheduler


      Hi,

      --- In perlguitest@y..., Jangale V-S <v-s.jangale@s...> wrote:
      > $test = SetForegroundWindow($_);

      As I posted here

      http://groups.yahoo.com/group/perlguitest/message/13
      <http://groups.yahoo.com/group/perlguitest/message/13>

      Win2K doesn't allow SetFore* unless you're the thread that created
      the window.

      If you're using Win2K you'll have to use SenKeys to send an ALT+TAB
      sequence that allows switching between applications.

      Regards,
      Ernesto.
      -- Ernesto Guisado, erngui@..., http://triumvir.org
      <http://triumvir.org>




      To unsubscribe from this group, send an email to:
      perlguitest-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
      <http://docs.yahoo.com/info/terms/> .
    • erngui
      Hi, ... Yes, you would need to keep alt down while sending several sequential tab keys. The problem is that SendKeys doesn t allow that. If you download the
      Message 2 of 4 , Jun 20, 2002
      • 0 Attachment
        Hi,

        --- In perlguitest@y..., Jangale V-S <v-s.jangale@s...> wrote:
        > I tried switching between windows by using
        >
        > SendKeys("%{TAB}{PAUSE 1000}");
        >
        > in a loop !
        >
        > However program keeps on switching between
        > first two windows only !

        Yes, you would need to keep alt down while sending several sequential
        tab keys. The problem is that SendKeys doesn't allow that. If you
        download the latest version (see 1.49.1 in the files section), you
        can do this:

        use Win32::GuiTest qw/:FUNC :VK/;

        SendRawKey(VK_MENU, 0);
        SendKeys("{TAB}{PAU 1000}{TAB}{PAU 1000}{TAB}");
        SendRawKey(VK_MENU, KEYEVENTF_KEYUP);

        The PAUSE commands are only there so that you can see what's going on.

        Regards,
        Ernesto.
        -- Ernesto Guisado <mailto:erngui@...>, <http://triumvir.org>
      Your message has been successfully submitted and would be delivered to recipients shortly.