Jump to content
Sign in to follow this  

[SOLVED] [newbie] Combo isn't receiving keystrokes?

Recommended Posts



I need to select an item in a non-standard combobox (ie. Delphi control, not a native Windows control).

I failed trying to find the item and selecting it, so as a work-around, I'm simply hitting PageUp followed by two hits of the up arrow, which will get me there.

Problem is, the following code does send the PageUp keystroke, but not the two up arrow keystrokes:

;Put focus on combobox, and send PageUp, followed by two up arrows
ControlFocus("[CLASS:MainWindow]", "", "[CLASS:MyCombo; INSTANCE:2]")
ControlSend("[CLASS:MainWindow]", "", "[CLASS:MyCombo]", "{PGUP}{DOWN}{DOWN}")

Before I spend more time trying to figure it out, is this an obvious newbie mistake?

Thank you.

Edited by littlebigman

Share this post

Link to post
Share on other sites

Stupid me: For some tabs in the UI, there are more than one instance of the combo, and I was missing "INSTANCE:2" in the second command. Sorry about that.

This forums doesn't seem to allow deleting a thread, so I'll just leave it for posterity.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.