Sign in to follow this  
Followers 0
manjula

How to select text in class view

3 posts in this topic

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.

Thanks,

P. Manjula

post-73934-0-95581400-1344516754_thumb.p

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]","","")

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)

WinWait($title,$text,$timeout)

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

WinWaitActive($title,$text,$timeout)

EndFunc

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 )

endif

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

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

MsgBox(0,$temp,$control)

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.

Thanks,

P. Manjula

post-73934-0-04757100-1344582718_thumb.p

post-73934-0-27297500-1344583250_thumb.p

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