I'm passing an argument X to a subroutine in UFT that will go to a dropdown control and select the Xth item
My first attempt worked, and I was basically just sending 'up' a bunch of times to get ensure I was at the top of the menu, then 'down' X times to get to the item I wanted
Win().Click 431, 548 'selecting the dropdown
For Iterator = 1 To 10 Step 1 'reset the selector to be on the top level
Win().Key micUp
Next
For Iterator = 1 To X Step 1
Win().Key micDwn
Next
Win().Key micReturn
However, the input happened very slowly, and I wanted it to happen faster, so I tried to concatenate all of the buttons I wanted to press before calling the Key function a single time:
Win().Click 431, 548 'selecting the dropdown
Dim KeyInput
KeyInput = ""
For Iterator = 1 To 10 Step 1 'reset the selector to be on the top level
KeyInput = KeyInput & micUp
Next
For Iterator = 1 To X Step 1
KeyInput = KeyInput & micDwn
Next
KeyInput = KeyInput & micReturn
Win().Key KeyInput
However, I'm not getting any key inputs at all with this - is there a different way to concatenate?
EDIT: as for other methods, it's not a standard dropdown, so I can't do anything that relies on interacting with it directly as far as I can tell.