GetComboContents and GetComboText newbie problem.
Apologies if this is a double post.
I am having some problems with the GetComboContents and/or
Having identified the combo box I want text values out of I call
getcombocontents into an array and then call getcombotext on each of
the entries in that array.
However - instead of returning the text of the combo box contents
this code returns a single byte, possibly a pointer or lookup to the
actual text. possibly something completely different. I want the
text and it's driving me loopy.
I have tried a few variations of iterating through the @contents
array, tried doing it in different places in the code, nothing seems
to work. I just get a single raw byte back for each entry in the
box. I know this is the right box because there are 26 entries in
it, no other box on the page has 26 options.
Heres the code I am using.
use Win32::GuiTest qw/SendKeys FindWindowLike GetComboContents
my @contents = ();
#Find the IE window I want
my ($ie_window) = FindWindowLike(0, "Bob", "IEFrame");
#Check I have found it
die "Bob is not a window on the screen" unless $ie_window;
#Find the combo boxes on the page ( I think )
@combo_boxes = FindWindowLike
#theres a few combo boxes, this is the one I want.
@contents = GetComboContents(@combo_boxes);
#Determine how big it is..
#Iterate through it getting the text and printing it. only it gets a
#single byte lookup, 4 "smiley face" characters
#like you get if you dump executables to the screen.
Any help most gratefully appreciated. What on earth am I doing wrong
here, and is it completely wrong or just a bit wrong.