Jump to content

Text searching


caramen
 Share

Recommended Posts

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 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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

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 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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

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 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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

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

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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

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 ~ getENVvars
My 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...