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

StackOverflow https://stackoverflow.com/questions/6332144

  •  27-10-2019
  •  | 
  •  

Question

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)

autoit window info:

http://s3.postimage.org/84cezen72/2011_06_13_174651.png

Was it helpful?

Solution

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)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top