I am trying to automate the export of a Crystal report into a PDF file.
After I tell Crystal that I want to do an export, it is displaying a window where I have to choose the export format from a ComboBox: TXT, PDF, RPT, etc...
First question: I can TAB to the field, but what is the key sequence to open the drop-down list?
Second question: The items shown in the drop-down list is varying from one PC to another. I know that PDF will always be one of the choice, but I do not know where it will be placed in the list. How could I select it?
Unfortunately, I do not have the option to enter my choice from the keyboard into that field. I must select from the drop-down.
As much as possible, I am trying to avoid mouse control. So, I am looking fo a solution that could be implemented through key sequences.
Thank you,
Gaston,
Ottawa, canada
Selecting an item from a ComboBox
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Most combo boxes use the DOWN arrow to make selections.First question: I can TAB to the field, but what is the key sequence to open the drop-down list?
If the desired choice is not always in same position, then you could make a loop to press Down, compare the value to desired value. If OK, continue, it not OK press Down by one more count., compare again, continue or loop until desired value is located.How could I select it?
Unfortunately, I do not have the option to enter my choice from the keyboard into that field. I must select from the drop-down.
Or you may be able to tab to the combo box, and paste in the desired value and it may be accepted when you tab out. This will depend on how the combo box has been designed in different applications.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
ALT+ will typically open that drop down menu. You can then release alt, and use further keys (like P, or the arrow keys)
MSched recently introduced a fantastic new command:
SelectMenu>WindowTitle,MenuIndex[,SubMenuIndex[,SubMenuIndex[,...]]]
Example:
SelectMenu>Notepad*,0,2
If the locations of the items differ from PC to PC, try something like:
Press ALT
Sen>f
wait>0.3
Sen>p
Release ALT
This *should* select the menu which has "F" underlined (ie, it's entered as "&F"). If nothing is underlined with an F, it may select the first instance that starts with an F.
Same for the sub-menu that has P underlined, or starts with a P.
If you're on about combo boxes, rather than "context sensitve menus" (file, edit, view, etc), pressing P while focused in that field should jump to the next instance beginning with P. Pressing it twice jumps to the second, etc.
MSched recently introduced a fantastic new command:
SelectMenu>WindowTitle,MenuIndex[,SubMenuIndex[,SubMenuIndex[,...]]]
Example:
SelectMenu>Notepad*,0,2
If the locations of the items differ from PC to PC, try something like:
Press ALT
Sen>f
wait>0.3
Sen>p
Release ALT
This *should* select the menu which has "F" underlined (ie, it's entered as "&F"). If nothing is underlined with an F, it may select the first instance that starts with an F.
Same for the sub-menu that has P underlined, or starts with a P.
If you're on about combo boxes, rather than "context sensitve menus" (file, edit, view, etc), pressing P while focused in that field should jump to the next instance beginning with P. Pressing it twice jumps to the second, etc.