Sign in to follow this  
Followers 0
pclayton999

ControlClick problem selecting line items within window

5 posts in this topic

Hello..

I have been searching the forums and came up empty trying to puzzle this one out, so I'm posting the question.

The script I have fires up a number of windows and then comes back to each and does various actions.

One such window is the Windows 7 'Configuration Manager Properties' window which is started by sending the following line into a cmd.exe window.

Send("C:\Windows\SysWOW64\CCM\SMSCFGRC.cpl Configuration Manager {ENTER}")

I then circle back around to this window, make it have active focus and click on the 'Configurations' tab

WinActivate("Configuration Manager Properties")

ControlClick("Configuration Manager Properties", "","[CLASS:SysTabControl32; INSTANCE:1]","left",1,190,8)

Up to this point, all is well.

Now I want to click on the first line that shows up in this window, which for us is a line about FEP Monitoring. I did another ControlClick using the information from the AutoIt WIndow Info utility and composed the following line using the 'ControlClick Coords' value

ControlClick("Configuration Manager Properties", "","","left",1,47,26)

And this did not select the first line.

I tried using Class, instance and many other items in the ControlClick line and none of the combinations resulted in the first line being selected.

If I want to click on any of the buttons I have no problem at all.

What am I missing about how to force the first line to select?

Appreciate the help!

pdc

Share this post


Link to post
Share on other sites



Hi, pclayton999. Unfortunately, I have not set up any Configuration Baselines in SCCM, so don't have anything listed under the Configurations tab. Just out of curiosity, although it is by no means my first suggestion, what if you simply send a couple of TABS to the window after you give the correct tab focus? This will at least let you know you should be able to highlight the line you want.

Also, what is your end goal in your script? There may be an easier method to do what you want with the SCCM client without having to resort to ControlClicking your way through the tabs.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Hello..

The tabbing suggestion is good but does not get me to any of the actual lines within the baselines section.

What I want to do is select the various lines and then the 'Evaluate' button to have it verified as being current and correct.

This is the 2nd window I have tried to do the ControlClick option to click a specific point on a window and failed and was hoping if I could get this working I could apply that knowledge to other windows. The first window was actually within the 'System And Security' control panel window and I wanted to click on the 'Action Center' hyperlink on that page and could not get that working either. Ended up just starting the 'Action Center' directly with a "run ("control /name microsoft.actioncenter")" line in the script.

Just frustrating that I can not fathom out the magic incantation to do relative location mouse clicks within a window space in these cases.

Share this post


Link to post
Share on other sites

It can be difficult, especially as ControlClick depends on how the 3rd party creates their windows. I do quite a bit of scripting in SCCM, and usually try to find a way to do it without ControlClick due to the frustration. I will look and see if there is another way to automate what you're trying to do.

In the meantime, if you would like to continue on the ControlClick path, I would suggest searching the forum for ControlClick SysListView32. There are a number of topics about clicking an item in an external app's window; you might just find something useful.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

J..

I did the search and reading. None of the entries resulted in the line being selected in the window from my experiements.

For this test case having an option within SCCM to do the work, while viable for this specific task, is not the need as there are other windows I have tried to use ControlClick on to click various hyperlinks and other things. More times than not, the window is not responding the way I would expect.

Thanks.

pdc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0