开发者

AHK Struggles to Enter Values into ComboBox

开发者 https://www.devze.com 2023-02-01 06:44 出处:网络
I am writing an AHK script t开发者_Go百科o 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 num

I am writing an AHK script t开发者_Go百科o 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


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).


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

0

精彩评论

暂无评论...
验证码 换一张
取 消