Sign in to follow this  
Followers 0
littlebigman

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

2 posts in this topic

#1 ·  Posted (edited)

Hello

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  
Followers 0