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

Click on ListBox items?

Expand Messages
  • jdc5567
    Hi everybody, I m revisiting Win32::GuiTest and it s come a long way since I last saw it. I ve begun writing a script to automate my application but hit a snag
    Message 1 of 4 , Nov 18, 2005
    • 0 Attachment
      Hi everybody,
      I'm revisiting Win32::GuiTest and it's come a long way since I
      last saw it. I've begun writing a script to automate my application
      but hit a snag very early on. The tutorial describes commands for
      getting the contents of a ListBox control (NOT a ListView control, I'm
      talking about a plain old ListBox) but not for clicking on those.
      There also doesn't seem to be a function to determining which item is
      selected. Is that true? Is there no way to select an item in a
      ListBox? It seems to me that selecting items in ListViews and
      ComboBoxes can't be so different right? My code is properly getting
      the contents of a ListBox but I have no way to tell if it's selected
      or a way to click an item. I have to click an item to get my app (not
      my code so I can't change a ListBox to a ListView and be ok) to
      update. I've seen some hacks for using the keyboard to manipulate
      selection but that seems unreliable without a function to verify
      what's currently selected.

      Suggestions? Any hope for more ListBox controls soon? Thanks!
    • Piotr Kaluski
      ... You are right, no clicking on an item is implemented. You can select them by Sel* functions. They worked for me, however, there are some voices, that in
      Message 2 of 4 , Nov 19, 2005
      • 0 Attachment
        --- In perlguitest@yahoogroups.com, "jdc5567" <jdc556@h...> wrote:
        >
        > Hi everybody,
        > I'm revisiting Win32::GuiTest and it's come a long way since I
        > last saw it. I've begun writing a script to automate my application
        > but hit a snag very early on. The tutorial describes commands for
        > getting the contents of a ListBox control (NOT a ListView control, I'm
        > talking about a plain old ListBox) but not for clicking on those.

        You are right, no clicking on an item is implemented. You can select
        them by Sel* functions. They worked for me, however, there are some
        voices, that in some circumstances they do not work.


        > There also doesn't seem to be a function to determining which item >
        is selected

        You are right. And I understand your disbelief. It is so obvious
        functionality. But it is not there :-). If there is some time then
        maybe...


        > It seems to me that selecting items in ListViews and
        > ComboBoxes can't be so different right?

        From technical point of view they are different. Which does not change
        the fact that from the user's point of view they are always the same.

        --Piotr
      • jdc5567
        I appreciate the response. I tried to use the other Sel* commands but they didn t work. I also tried to use the other Get* commands to see if I could read out
        Message 3 of 4 , Nov 19, 2005
        • 0 Attachment
          I appreciate the response. I tried to use the other Sel* commands but
          they didn't work. I also tried to use the other Get* commands to see
          if I could read out the contents of the ListBox with the ListView or
          ComboBox commands but that of course did not work. I did use the
          GetListBox command to get the contents.

          I understand that it's not the same as a Combo or a ListView but it
          can't be too different right? I'd love to see it in a future release,
          thanks for considering it.

          Great work by the way, please keep it up!

          --- In perlguitest@yahoogroups.com, "Piotr Kaluski" <pkaluski@p...> wrote:
          >
          > --- In perlguitest@yahoogroups.com, "jdc5567" <jdc556@h...> wrote:
          > >
          > > Hi everybody,
          > > I'm revisiting Win32::GuiTest and it's come a long way since I
          > > last saw it. I've begun writing a script to automate my application
          > > but hit a snag very early on. The tutorial describes commands for
          > > getting the contents of a ListBox control (NOT a ListView control, I'm
          > > talking about a plain old ListBox) but not for clicking on those.
          >
          > You are right, no clicking on an item is implemented. You can select
          > them by Sel* functions. They worked for me, however, there are some
          > voices, that in some circumstances they do not work.
          >
          >
          > > There also doesn't seem to be a function to determining which item >
          > is selected
          >
          > You are right. And I understand your disbelief. It is so obvious
          > functionality. But it is not there :-). If there is some time then
          > maybe...
          >
          >
          > > It seems to me that selecting items in ListViews and
          > > ComboBoxes can't be so different right?
          >
          > From technical point of view they are different. Which does not change
          > the fact that from the user's point of view they are always the same.
          >
          > --Piotr
          >
        • jdc5567
          After reading some documentation it looks like the LB_SELECTSTRING message will get the job done for strings, LB_SELITEMRANGE for index based select. Is that
          Message 4 of 4 , Nov 19, 2005
          • 0 Attachment
            After reading some documentation it looks like the LB_SELECTSTRING
            message will get the job done for strings, LB_SELITEMRANGE for index
            based select. Is that not the case?

            --- In perlguitest@yahoogroups.com, "jdc5567" <jdc556@h...> wrote:
            >
            > I appreciate the response. I tried to use the other Sel* commands but
            > they didn't work. I also tried to use the other Get* commands to see
            > if I could read out the contents of the ListBox with the ListView or
            > ComboBox commands but that of course did not work. I did use the
            > GetListBox command to get the contents.
            >
            > I understand that it's not the same as a Combo or a ListView but it
            > can't be too different right? I'd love to see it in a future release,
            > thanks for considering it.
            >
            > Great work by the way, please keep it up!
            >
            > --- In perlguitest@yahoogroups.com, "Piotr Kaluski" <pkaluski@p...>
            wrote:
            > >
            > > --- In perlguitest@yahoogroups.com, "jdc5567" <jdc556@h...> wrote:
            > > >
            > > > Hi everybody,
            > > > I'm revisiting Win32::GuiTest and it's come a long way
            since I
            > > > last saw it. I've begun writing a script to automate my application
            > > > but hit a snag very early on. The tutorial describes commands for
            > > > getting the contents of a ListBox control (NOT a ListView
            control, I'm
            > > > talking about a plain old ListBox) but not for clicking on those.
            > >
            > > You are right, no clicking on an item is implemented. You can select
            > > them by Sel* functions. They worked for me, however, there are some
            > > voices, that in some circumstances they do not work.
            > >
            > >
            > > > There also doesn't seem to be a function to determining which item >
            > > is selected
            > >
            > > You are right. And I understand your disbelief. It is so obvious
            > > functionality. But it is not there :-). If there is some time then
            > > maybe...
            > >
            > >
            > > > It seems to me that selecting items in ListViews and
            > > > ComboBoxes can't be so different right?
            > >
            > > From technical point of view they are different. Which does not change
            > > the fact that from the user's point of view they are always the same.
            > >
            > > --Piotr
            > >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.