0
votes

I am writing an AHK script to automate data entry into a GUI form. There is a drop-down box with a few hundred entries. I know the value I want to select and when I manually type in the number the combo box changes to the appropriate value. When I send the same string in AHK (using Send) it chooses the first item on the list. I have played around with various values of SetKeyDelay (-1 through 2000).

SetKeyDelay 1000
Send %ItemNumber%
SetKeyDelay -1

Any suggestions here?

Thanks

Jonathan

2

2 Answers

1
votes

Have you tried other send modes? (Like SendInput, SendPlay, etc...)

Also, if it's a standard Windows combobox, it might be more precise to use messages (like CB_SETCURSEL).

0
votes

Turns out there was a line up top that was messing me up:

SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.

SendInput ignores the value of SetKeyDelay; the above line was converting all of my "Send"s to "SendInput"s

Thanks-

Jonathan