manjula Posted August 9, 2012 Share Posted August 9, 2012 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 Link to comment Share on other sites More sharing options...
somdcomputerguy Posted August 9, 2012 Share Posted August 9, 2012 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. Link to comment Share on other sites More sharing options...
manjula Posted August 10, 2012 Author Share Posted August 10, 2012 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)EndFuncAnd 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now