yclee99 Posted February 19, 2019 Posted February 19, 2019 Hi. I would like to know how to get the text (refer to attached image, "Project Name" column)? The Window Info is shown below. >>>> Window <<<< Title: Utility To Change Project's Attribute Class: #32770 Position: 550, 268 Size: 501, 324 Style: 0x94C800C4 ExStyle: 0x00050101 Handle: 0x0010035C >>>> Control <<<< Class: Button Instance: 5 ClassnameNN: Button5 Name: Advanced (Class): [CLASS:Button; INSTANCE:5] ID: Text: Projects Position: 9, 12 Size: 476, 228 ControlClick Coords: 191, 100 Style: 0x50000007 ExStyle: 0x00000004 Handle: 0x000D0280 >>>> Mouse <<<< Position: 753, 405 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< List3 &Register &Change &Delete &Exit Projects >>>> Hidden Text <<<<
alienclone Posted February 19, 2019 Posted February 19, 2019 try out this script https://www.autoitscript.com/forum/topic/164226-get-all-windows-controls/ it might be able to show you more window options to interact with. If @error Then MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!") EndIf "Yeah yeah yeah patience, how long will that take?" -Ed Gruberman REAL search results | SciTE4AutoIt3 Editor Full Version
yclee99 Posted February 21, 2019 Author Posted February 21, 2019 On 2/19/2019 at 4:59 PM, alienclone said: try out this script https://www.autoitscript.com/forum/topic/164226-get-all-windows-controls/ it might be able to show you more window options to interact with. Thanks for the information. I tried but I still cannot get the Project Name information. Below is the results using the above script. Func=[GetAllWindowsControls]: ControlCounter=[ 1] ControlID=[46071] Handle=[0x001302E0] ClassNN=[ Button1] XPos=[ 86] YPos=[ 255] Width=[ 105] Height=[ 23] IsVisible=[1] Text=[&Register]. Func=[GetAllWindowsControls]: ControlCounter=[ 2] ControlID=[46072] Handle=[0x0011025C] ClassNN=[ Button2] XPos=[ 201] YPos=[ 255] Width=[ 98] Height=[ 23] IsVisible=[1] Text=[&Change]. Func=[GetAllWindowsControls]: ControlCounter=[ 3] ControlID=[46073] Handle=[0x001B04E0] ClassNN=[ Button3] XPos=[ 312] YPos=[ 255] Width=[ 86] Height=[ 23] IsVisible=[1] Text=[&Delete]. Func=[GetAllWindowsControls]: ControlCounter=[ 4] ControlID=[ 1] Handle=[0x004C044A] ClassNN=[ Button4] XPos=[ 410] YPos=[ 254] Width=[ 79] Height=[ 23] IsVisible=[1] Text=[&Exit]. Func=[GetAllWindowsControls]: ControlCounter=[ 5] ControlID=[ -1] Handle=[0x001C02D2] ClassNN=[ Button5] XPos=[ 9] YPos=[ 12] Width=[ 476] Height=[ 228] IsVisible=[1] Text=[Projects]. Func=[GetAllWindowsControls]: ControlCounter=[ 6] ControlID=[ 0] Handle=[0x0019047A] ClassNN=[ SysHeader321] XPos=[ 21] YPos=[ 32] Width=[ 449] Height=[ 16] IsVisible=[1] Text=[]. Func=[GetAllWindowsControls]: ControlCounter=[ 7] ControlID=[46065] Handle=[0x000B02D4] ClassNN=[ SysListView321] XPos=[ 18] YPos=[ 29] Width=[ 453] Height=[ 197] IsVisible=[1] Text=[List3].
alienclone Posted February 21, 2019 Posted February 21, 2019 the sysheader and syslistview are what you will be working with... https://www.autoitscript.com/autoit3/docs/functions/ControlListView.htm If @error Then MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!") EndIf "Yeah yeah yeah patience, how long will that take?" -Ed Gruberman REAL search results | SciTE4AutoIt3 Editor Full Version
yclee99 Posted March 29, 2019 Author Posted March 29, 2019 I am still unable to get it work with ControlListView. Anyway, thanks.
alienclone Posted March 29, 2019 Posted March 29, 2019 where is the code you tried with ControlListView? If @error Then MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!") EndIf "Yeah yeah yeah patience, how long will that take?" -Ed Gruberman REAL search results | SciTE4AutoIt3 Editor Full Version
alienclone Posted March 29, 2019 Posted March 29, 2019 (edited) #include <MsgBoxConstants.au3> MsgBox($MB_SYSTEMMODAL, "", ControlListView("Utility To Change Project's Attribute", "", "46065", "GetItemCount")) Edited March 29, 2019 by alienclone If @error Then MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!") EndIf "Yeah yeah yeah patience, how long will that take?" -Ed Gruberman REAL search results | SciTE4AutoIt3 Editor Full Version
alienclone Posted March 29, 2019 Posted March 29, 2019 (edited) #include <MsgBoxConstants.au3> MsgBox($MB_SYSTEMMODAL, "", ControlListView("Utility To Change Project's Attribute", "", "46065", "GetText", 1)) Edited March 29, 2019 by alienclone If @error Then MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!") EndIf "Yeah yeah yeah patience, how long will that take?" -Ed Gruberman REAL search results | SciTE4AutoIt3 Editor Full Version
Belini Posted March 29, 2019 Posted March 29, 2019 Have you tried WinGetText? Opt("WinDetectHiddenText", 1) $info = WinGetText("Utility To Change Project's Attribute") MsgBox(4096, 'Result', $info) My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
BigDaddyO Posted March 29, 2019 Posted March 29, 2019 If you do the Au3Info on the actual List, what is it? Listbox, listview, ? I've had to deal with some Listbox controls that will not give up their text unless the row is selected using _GuiCtrlListBox_SetCurSel() only then will the ControlGetText() return the text from that selected row. Need to loop through to get the text from every row.
junkew Posted April 2, 2019 Posted April 2, 2019 Try faq 31 different spytools to see if control can be identified and text retrieved. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
jdelaney Posted April 2, 2019 Posted April 2, 2019 It's a listview, so use the _guictrllist functions IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
yclee99 Posted April 16, 2019 Author Posted April 16, 2019 On 3/29/2019 at 4:14 PM, alienclone said: #include <MsgBoxConstants.au3> MsgBox($MB_SYSTEMMODAL, "", ControlListView("Utility To Change Project's Attribute", "", "46065", "GetItemCount")) It just return "0".
yclee99 Posted April 16, 2019 Author Posted April 16, 2019 On 3/29/2019 at 4:15 PM, alienclone said: #include <MsgBoxConstants.au3> MsgBox($MB_SYSTEMMODAL, "", ControlListView("Utility To Change Project's Attribute", "", "46065", "GetText", 1)) It returns "0" as well.
yclee99 Posted April 16, 2019 Author Posted April 16, 2019 On 3/29/2019 at 6:26 PM, Belini said: Have you tried WinGetText? Opt("WinDetectHiddenText", 1) $info = WinGetText("Utility To Change Project's Attribute") MsgBox(4096, 'Result', $info) It shows the following List3&Register&Change&Delete&ExitProjects Above result is the same as what I got from using AutoIt Windows Info.
yclee99 Posted April 16, 2019 Author Posted April 16, 2019 On 3/29/2019 at 11:25 PM, BigDaddyO said: If you do the Au3Info on the actual List, what is it? Listbox, listview, ? I've had to deal with some Listbox controls that will not give up their text unless the row is selected using _GuiCtrlListBox_SetCurSel() only then will the ControlGetText() return the text from that selected row. Need to loop through to get the text from every row. I tried _GuiCtrlListBox_SetCurSel() and unable to select the row.
junkew Posted April 16, 2019 Posted April 16, 2019 Did you try my suggestion? FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
yclee99 Posted April 17, 2019 Author Posted April 17, 2019 10 hours ago, junkew said: Did you try my suggestion? Sorry. I missed your earlier post. I am not able to find the suggested tool (faq 31) online
yclee99 Posted April 17, 2019 Author Posted April 17, 2019 Thanks for all your replies. I manage to use above tool to get the information.
junkew Posted April 17, 2019 Posted April 17, 2019 Faq is frequently asked questions which all forummembers should read before asking questions. Below this answer you can see direct link to faq31 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
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