caramen Posted October 27, 2014 Share Posted October 27, 2014 (edited) Hello all I got that autoit windows info showing to myself these results : BLABLA 1 BLABLA 2 I need to search for the visible text ligne : 3515 "10.19.21.0 VLAN 3515" "10.19.21.1 VLAN 3516" "10.19.21.2 VLAN 3517" "10.19.21.3 VLAN 3518" (And i see it in windows info visible text section) and click on it... it s in a combot box what is the best thing for that ? Mousclick to deploy combot box items, then .... ? I need somthing like pixel search but for text i find the command WinGetText after find the text how to click on it? i guess somthing about : The visible text = "10.19.21.0 VLAN 3515" "10.19.21.1 VLAN 3516" "10.19.21.2 VLAN 3517" "10.19.21.3 VLAN 3518" $Vlan = 3515 $A = Wingettext = $Vlan $B= wingetpos = $A Mouseclick = $B Edited October 27, 2014 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
caramen Posted October 27, 2014 Author Share Posted October 27, 2014 (edited) I did That : Global $VlanLabel = GUICtrlCreateLabel ("Entrer votre Vlan :", 180, 210, 150, 50) Global $VlanA = GUICtrlCreateInput ("Vlan?", 180, 230, 150, 20) While (1) $VlanB = GUICtrlRead($VlanA) If $VlanB = "Vlan?" then MsgBox($MB_SYSTEMMODAL, "Merci", "Selectionnez le VLAN manuellement. Puis valider.") ;Select the Vlan Manualy ExitLoop Else $Pos = WinGetText ($VlanB) $Position = WinGetPos ($Pos) MouseClick ("Left" , $Position[0]-1,$Position[0]-1) WEnd It clicking to pixel 0,0 Is it even possible to a get the posision of a result from WinGetText ??? Not working, anyhelp ? Edited October 27, 2014 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
caramen Posted October 28, 2014 Author Share Posted October 28, 2014 up My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
jguinch Posted October 28, 2014 Share Posted October 28, 2014 What kind of control is "10.19.21.0 VLAN 3515" ? Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
caramen Posted October 29, 2014 Author Share Posted October 29, 2014 (edited) It s a windows Combot box item from the software Virtual Center VMware Vsphere In the autoit software "Windows info" The text apear corectly so i expect it is readable easy but my question: when i read a text with autoit and when i found it: how to click on it ... Just a simple left click Edited October 29, 2014 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
AutID Posted October 29, 2014 Share Posted October 29, 2014 ControlGetHandle -- > ControlGetText --> ControlGetPos and ControlClick https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
jdelaney Posted October 29, 2014 Share Posted October 29, 2014 No point in automating vsphere, when they have an api you can call directly. https://www.vmware.com/support/developer/windowstoolkit/wintk40u1/html/ 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. Link to comment Share on other sites More sharing options...
caramen Posted October 30, 2014 Author Share Posted October 30, 2014 ControlGetHandle -- > ControlGetText --> ControlGetPos and ControlClick Can you provide me plz an exemple of ControlGetHandle usage plz ? (to understand that easy) My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
MikahS Posted October 30, 2014 Share Posted October 30, 2014 Can you provide me plz an exemple of ControlGetHandle usage plz ? (to understand that easy) fresh from the helpfile : #include <MsgBoxConstants.au3> Example() Func Example() ; Run Notepad Run("notepad.exe") ; Wait 10 seconds for the Notepad window to appear. Local $hWnd = WinWait("[CLASS:Notepad]", "", 10) ; Retrieve the handle of the edit control in Notepad. The handle returned by WinWait is used for the "title" parameter of ControlGetHandle. Local $hControl = ControlGetHandle($hWnd, "", "Edit1") ; Display the handle of the edit control. MsgBox($MB_SYSTEMMODAL, "", "The handle of Edit1 is: " & $hControl) ; Close the Notepad window using the handle returned by WinWait. WinClose($hWnd) EndFunc ;==>Example Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ 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