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

GetComboText and GetComboContents

Expand Messages
  • aslpyee
    Hi there, how to use GetComboText and GetComboContents? Where can I find the help file for this? Regards, Yee
    Message 1 of 2 , Dec 19, 2001
    • 0 Attachment
      Hi there,

      how to use GetComboText and GetComboContents? Where can I find the
      help file for this?

      Regards,
      Yee
    • erngui
      ... Sorry for the delay, just came back from holidays. The documentation is definitively something I have to improve... Did you take a look at the samples in
      Message 2 of 2 , Jan 3, 2002
      • 0 Attachment
        --- In perlguitest@y..., "aslpyee" <aslpyee@n...> wrote:
        > Hi there,
        >
        > how to use GetComboText and GetComboContents? Where can I find the
        > help file for this?
        >

        Sorry for the delay, just came back from holidays.

        The documentation is definitively something I have to improve...

        Did you take a look at the samples in the 'eg' directory?

        In particular 'eg\fonts.pl':

        use Win32::GuiTest qw/SendKeys FindWindowLike GetComboContents/;

        # Let's see notepad
        system("start notepad.exe");
        sleep 1;

        # Open the Font dialog (change for you language)
        SendKeys("%ef");

        # Find the Font dialog using the title and window class
        # The Font dialog isn't a child of the notepad window
        my ($fontdlg) = FindWindowLike(0, "Font", "#32770");
        die "Where is the Font dialog?\n" unless $fontdlg;

        # Find the right combo using it's control id
        my ($combo) = FindWindowLike($fontdlg, "", "ComboBox", 0x470);
        die "Where is the combo with the font names?" unless $combo;

        # Print all the font names
        for (GetComboContents($combo)) {
        print "'$_'" . "\n";
        }

        # Close the dialog and notepad
        SendKeys("{ESC}%{F4}");

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