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

Problem with Sendkeys("{HOME}+{END}")

Expand Messages
  • jimfromf1
    Hi, I m trying to do.... Sendkeys( {HOME}+{END} ) ...but it doesn t seem to work as expected. It seems that what s actually being sent to the AUT is
    Message 1 of 4 , Jul 25, 2002
    • 0 Attachment
      Hi,

      I'm trying to do....

      Sendkeys("{HOME}+{END}")

      ...but it doesn't seem to work as expected. It seems that what's
      actually being sent to the AUT is Sendkeys("{HOME}{END}") -- in other
      words the SHIFT key isn't held down while END is pressed. It simply
      takes me to the beginning of the line and then to the end of the line
      without highlighting the text in between. Any ideas????

      I'm using version 1.49. Thanks!

      Jim
    • erngui
      Hi, ... I just tried this on my NT box (using 1.49.2): Win32::GuiTest::SendKeys(qq({PAU 5000}{HOME}+{END})) Then I switched over to VC++ and 5 seconds later
      Message 2 of 4 , Jul 26, 2002
      • 0 Attachment
        Hi,

        > Sendkeys("{HOME}+{END}")

        I just tried this on my NT box (using 1.49.2):

        Win32::GuiTest::SendKeys(qq({PAU 5000}{HOME}+{END}))

        Then I switched over to VC++ and 5 seconds later (as expected) the
        current line was selected.

        Unless it's something OS specific (I doubt it), I'd check by hand if
        your AUT really supports SHIFT+END. I know it sounds silly, but you
        never know...

        Regards,
        Ernesto.
        -- Ernesto Guisado (http://triumvir.org)
      • jimfromf1
        Hi Ernesto, Thanks for testing it and getting back to me! After more testing, it turns out that it works fine on my Windows 2000 box and fails on my Windows XP
        Message 3 of 4 , Jul 26, 2002
        • 0 Attachment
          Hi Ernesto,

          Thanks for testing it and getting back to me! After more testing, it turns out that it works fine on my Windows 2000 box and fails on my Windows XP box. The AUT is just Notepad on both OSs. If I type "home shift-end" by hand in Notepad it highlights the line of text as it should, but unfortunately GuiTest is not able to do the same on XP. Oh well.....

          It is a great tool though!

          Jim

          --- In perlguitest@y..., "erngui" <erngui@a...> wrote:
          > Hi,
          >
          > > Sendkeys("{HOME}+{END}")
          >
          > I just tried this on my NT box (using 1.49.2):
          >
          > Win32::GuiTest::SendKeys(qq({PAU 5000}{HOME}+{END}))
          >
          > Then I switched over to VC++ and 5 seconds later (as expected) the
          > current line was selected.
          >
          > Unless it's something OS specific (I doubt it), I'd check by hand if
          > your AUT really supports SHIFT+END. I know it sounds silly, but you
          > never know...
          >
          > Regards,
          > Ernesto.
          > -- Ernesto Guisado (http://triumvir.org)
        • ctrondlpaulsden
          Jim, I had a chance to use Ernesto s example on my Windows XP Home system using Notepad and it worked as expected. If you haven t already and want to, give
          Message 4 of 4 , Aug 7, 2002
          • 0 Attachment
            Jim,

            I had a chance to use Ernesto's example on my Windows XP Home system
            using Notepad and it worked as expected. If you haven't already and
            want to, give his example with the pause (PAU) a try.

            If your test script opens up the application and attempts to select
            the line right away, it might be a timing issue (i.e., maybe SendKeys
            processes before application is finished setting its controls up).
            Look into using WaitWindow.

            Also make sure the Edit control actually has the focus.

            --- In perlguitest@y..., "jimfromf1" <jimfromf1@y...> wrote:
            > Hi Ernesto,
            >
            > Thanks for testing it and getting back to me! After more testing,
            it turns out that it works fine on my Windows 2000 box and fails on
            my Windows XP box. The AUT is just Notepad on both OSs. If I
            type "home shift-end" by hand in Notepad it highlights the line of
            text as it should, but unfortunately GuiTest is not able to do the
            same on XP. Oh well.....
            >
            > It is a great tool though!
            >
            > Jim
            >
            > --- In perlguitest@y..., "erngui" <erngui@a...> wrote:
            > > Hi,
            > >
            > > > Sendkeys("{HOME}+{END}")
            > >
            > > I just tried this on my NT box (using 1.49.2):
            > >
            > > Win32::GuiTest::SendKeys(qq({PAU 5000}{HOME}+{END}))
            > >
            > > Then I switched over to VC++ and 5 seconds later (as expected)
            the
            > > current line was selected.
            > >
            > > Unless it's something OS specific (I doubt it), I'd check by hand
            if
            > > your AUT really supports SHIFT+END. I know it sounds silly, but
            you
            > > never know...
            > >
            > > Regards,
            > > Ernesto.
            > > -- Ernesto Guisado (http://triumvir.org)
          Your message has been successfully submitted and would be delivered to recipients shortly.