How to compare variable to the combo box list

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
hardik_228
Newbie
Posts: 12
Joined: Mon Dec 01, 2008 10:46 am

How to compare variable to the combo box list

Post by hardik_228 » Mon Sep 20, 2010 4:00 am

Hi there :)

How can i compare variable to the combobox list value.

What I want to acheive here is, if combobox is full with 10 items in it and as soon as it will find exect item as per variable it will select that only and press TAB.

Please help here :(

I am trying to do this from last two weeks and no luck yet.

Thanks in advance.

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Mon Sep 20, 2010 5:20 pm

Is the combobox a component on a Macro Scheduler Dialog you wrote, or is it on a webpage, or application?

The difference being that if it is a Macro Scheduler component, you have more control than you do if it is merely a GUI element exposed from another application.

If it is on a webpage or another executable, you will have to use whatever means are provided to select from the list. In an application I have used which is compiled with Delphi, for example, sending keystrokes slowly makes the item in the list "pop up" and be selected. In another application I had to select the first item in the list by using mouse movements, then "highlight" the entry by sending a space character, then send the key strokes of Ctrl-c to copy to the clipboard, then read the clipboard using the macro scheduler command GetClipBoard> and if it's not the right one, then select the next item in the list, and loop again.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts