Jump to content
Sign in to follow this  

How to select text in class view

Recommended Posts


Hi All,

I have to select "RPTS33" (any text in classview) And right click to select context menu.

I tried with record but it showing mouse clicks and respective coordinates.

But i want to select through the Name or classnn property.

I have attached the screenshot for your reference.

Help will be highly appreciable.


P. Manjula


Share this post

Link to post
Share on other sites

With this function, ControlCommand, you may be able to do what you want..

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post

Link to post
Share on other sites

Thanks for the reply.


I tried below code to select the item called "RPTS33" from the class view but i am unable to select the item.

_WinWaitActivate("RPTS33MCP - Microsoft Visual Studio (Administrator)","")


ControlClick("[CLASS:GenericPane]", "RPTS33", "[CLASSNN:Static1]")

Local $sText =ControlGetText("", "RPTS33", "[CLASS:SysTreeView32; INSTANCE:1 ; ID:257]")

MsgBox(0, "ControlGetText Example", "The control text is: " & $sText)

ControlFocus("", "RPTS33", "[CLASSNN:Static1]")

_WinWaitActivate("RPTS33MCP - Microsoft Visual Studio (Administrator)","")

ControlClick("RPTS33MCP - Microsoft Visual Studio (Administrator)", "RPTS33", "[CLASSNN:Static1]")

Func _WinWaitActivate($title,$text,$timeout=0)


If Not WinActive($title,$text) Then WinActivate($title,$text)



And also i tried below code:

#include <C:\Program Files\AutoIt3\Include\DotNetIdentification.au3>

$WindowName = "RPTS33MCP - Microsoft Visual Studio (Administrator)"

$WindowText = ""

$control = NET_ControlGetHandleByName( $WindowName, $WindowText, "" )

MsgBox(0, "CControlGetHandleByNamexample", "The control text is: " & $control)

if @error = 0 then

WinActivate( $WindowName, $WindowText )

ControlFocus( $WindowName, $WindowText, $control )


$control = NET_ControlGetHandleByName($WindowName,"","[CLASS:Static; INSTANCE:1]")MsgBox(0, "CControlGetHandleByNamexample", "The control text is: " & $control)

$temp = ControlCommand($WindowName,"",$control,"SelectString",'RPTS33')


in the "classview_all.png" file i have to select classview (marked in Red) and inside the classview i have to select item "RPTS33" (marked in Black) and right click on that item.

Help needed urgently.


P. Manjula



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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.