Opened 17 years ago
Closed 17 years ago
#158 closed Bug (No Bug)
ControlClick not working on some Vista windows.
Reported by: | llombard@… | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.2.10.0 | Severity: | |
Keywords: | Cc: |
Description
AutoIT Version: 3.2.10.0
This problem is observed trying to click the "Open Network and Sharing Center" Link on the "Connect to a network" window in Vista. You will need a wireless card on a vista machine in order to run this script. The script expects the card name to be 'Wireless' but this can be changed by changing the $adapter variable. I have put in two different ControlClick attempts, both of which should work, but do not. I have commented them as such. I have attached the code as well.
CODE
{{
global $NCTITLE = "Network Connections"
global $NETWORKSCONTROL = "SysListView321"
global $adapter = "Wireless"
;Launch Network Properties page
Run ("control.exe ncpa.cpl")
WinActivate ($NCTITLE)
sleep (100)
;Select wireless adaptor
ControlListView($NCTITLE, "", $NETWORKSCONTROL, "Select", ControlListView($NCTITLE,"",$NETWORKSCONTROL,"FindItem",$adapter) )
sleep (200)
;Get drop down options for Adaptor - same as right click
ControlSend($NCTITLE, "", $NETWORKSCONTROL, "+{F10}")
sleep (100)
;select Connect/Disconnect
ControlSend($NCTITLE, "", $NETWORKSCONTROL, "o")
sleep(200)
WinActivate ("Connect to a network")
;Both of these variants should work but don't
ControlClick ("Connect to a network", "", 1007)
ControlClick ("Connect to a network", "", "SysLink4")
}}
Attachments (2)
Change History (5)
Changed 17 years ago by llombard@…
comment:1 Changed 17 years ago by Valik
- Resolution set to No Bug
- Status changed from new to closed
Alright, you really need to provide examples that we can all use even if it's not specific to your current problem. I can't reproduce the dialog so I'm only partially guessing here. With that in mind...
It doesn't respond to a ControlClick(), so what? That's not terribly uncommon when you're trying to automate a non-standard control. And judging by the name of the class for the control, it's most definitely non-standard. This is not a bug and I'm closing it as such. You should have asked for Support on the forum first.
comment:2 follow-up: ↓ 3 Changed 17 years ago by llombard@…
- Resolution No Bug deleted
- Status changed from closed to reopened
How can this window, or my other area, be a non-standard window? These window's are part of the Vista OS. The ControlClick command works in all other locations, why not here? Are there any plans to remedy these issues?
I realize that this is a free program and you aren't required to support these issues, but if you don't want to fix something, just say so instead of stating it is a non-standard control that is part of the Vista OS.
comment:3 in reply to: ↑ 2 Changed 17 years ago by Valik
- Resolution set to No Bug
- Status changed from reopened to closed
Replying to llombard@nexthop.com:
How can this window, or my other area, be a non-standard window? These window's are part of the Vista OS. The ControlClick command works in all other locations, why not here? Are there any plans to remedy these issues?
Don't just assume "Hey, Microsoft made this, it must be standard". Microsoft have a history of using non-standard controls in their software. Microsoft are the software company *least likely* to use a Microsoft control, in my experience.
I realize that this is a free program and you aren't required to support these issues, but if you don't want to fix something, just say so instead of stating it is a non-standard control that is part of the Vista OS.
There is nothing to fix. User expectations not being met does not mean software bug, in your case, it means the user is expecting something unreasonable. We are not going to add support for this stuff at this time. We can't very well go around supporting every single control type implemented on Windows by various vendors, even if that vendor happens to be Microsoft. There is a certain core set of controls that are considered standard, we support those. Things outside that core set are generally not specifically supported by AutoIt. That doesn't mean you can't interact with them, many you can, but if you can't, well, you're on your own and will have to learn how to interact with the control yourself.
As I stated, this is a Support question. Do not re-open this ticket just because you don't agree with the resolution. Please read WikiStart and follow those guidelines in the future.
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
AutoIT script.