开发者

Why _GUICtrlListView_ClickItem is not working with Internet Explorer File Upload Dialog?

开发者 https://www.devze.com 2023-03-12 07:31 出处:网络
ok, i have been trying to find a way to choose and click for entering a folder while trying to pick files for uploading through internet explorer.

ok, i have been trying to find a way to choose and click for entering a folder while trying to pick files for uploading through internet explorer.

i'm currently using ControlListView for selecting a folder and then pressing {ENTER} with ControlSend because of there isn't any working function for "Click"

Everything works fine when working with example in help folder but when i trying to work with that file upload window (SysListView32) starting to close random windows.

Example code:

_GUICtrlListView_ClickItem(1, 1, "left", False, 2开发者_C百科)

autoit window info:

Why _GUICtrlListView_ClickItem is not working with Internet Explorer File Upload Dialog?


I can see what you're doing wrong, but not entirely sure how to fix it simply.

The problem is that you use this function _GUICtrlListView_ClickItem with parameters: 1, 1, "left", false, 2. While the first parameter (1) should be a handle to the control.

You can use ControlGetHandle to obtain a handle to the control. Something like:

$hWnd = ControlGetHandle("somethinghere")
_GUICtrlListView_ClickItem($hWnd, 1, "left", false, 2)
0

精彩评论

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

关注公众号