littlebigman Posted June 30, 2012 Share Posted June 30, 2012 (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 June 30, 2012 by littlebigman Link to comment Share on other sites More sharing options...
littlebigman Posted June 30, 2012 Author Share Posted June 30, 2012 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now