Jump to content

Controlclick on gpedit.msc


Recommended Posts

Hi

I am trying to click on right panel of gpedit.msc window using controlclick but it does not work.

Here is my code:

WinActivate("Group Policy")
;ControlClick("D:\Working\Elance\antonioj84\treeview.au3 ", "", "Scintilla1", "left", 1, 152, 7) ;this line work
Sleep(1000)
;ControlClick("Group Policy", "", "SysHeader321", "Left", 1, 152, 7) ;this work
ControlClick("Group Policy", "", "MMCOCXViewWindow1", "left", 1, 283, 63) ; does not work

The last command line is not work, although i tried comandclick for other window and it work.

post-36609-0-76144100-1396867455_thumb.j

Link to comment
Share on other sites

Hi

I am trying to click on right panel of gpedit.msc window using controlclick but it does not work.

Here is my code:

WinActivate("Group Policy")
;ControlClick("D:\Working\Elance\antonioj84\treeview.au3 ", "", "Scintilla1", "left", 1, 152, 7) ;this line work
Sleep(1000)
;ControlClick("Group Policy", "", "SysHeader321", "Left", 1, 152, 7) ;this work
ControlClick("Group Policy", "", "MMCOCXViewWindow1", "left", 1, 283, 63) ; does not work

The last command line is not work, although i tried comandclick for other window and it work.

No work man, note that the code ControlClick("Group Policy", "", "SysHeader321", "Left", 1, 152, 7) is worked.

Thanks for your idea. But here i want to use with GUI.

Link to comment
Share on other sites

Unfortunately, ControlClick is quite messy thing, so somethings it doesn't work. Maybe you can use one of the DLL function to perform what you need to do. Not sure which one though.

Can you give me an example that using DLL function to do click on a windows clients?

Link to comment
Share on other sites

This can be done with the UI Automation framework.

Download the two UDFs in bottom of first post, and download and run the code in the "Simple spy demo" codebox in the middle of first post.

To verify that a control can be identified place the mouse cursor over the control and press Ctrl+w. You can see an example here.

Note that the framework is based on COM interface objects (created with ObjCreateInterface), so it's not just as easy to use as most built-in commands.

Link to comment
Share on other sites

This can be done with the UI Automation framework.

Download the two UDFs in bottom of first post, and download and run the code in the "Simple spy demo" codebox in the middle of first post.

To verify that a control can be identified place the mouse cursor over the control and press Ctrl+w. You can see an example here.

Note that the framework is based on COM interface objects (created with ObjCreateInterface), so it's not just as easy to use as most built-in commands.

Oh yer, forgot about that one. That maybe a better idea.

Link to comment
Share on other sites

This can be done with the UI Automation framework.

Download the two UDFs in bottom of first post, and download and run the code in the "Simple spy demo" codebox in the middle of first post.

To verify that a control can be identified place the mouse cursor over the control and press Ctrl+w. You can see an example here.

Note that the framework is based on COM interface objects (created with ObjCreateInterface), so it's not just as easy to use as most built-in commands.

Thanks for your idea, i will try it.

Link to comment
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
 Share

×
×
  • Create New...