Sign in to follow this  
Followers 0
autoitxp

WinGetText text match

4 posts in this topic

#1 ·  Posted (edited)

Hi

How can i do text match on current active window like im using this code but its nt working prperly

$text=WinGetText("" , "mykeyword")  
if $text   then
MsgBox(0 , "" , "FOUND")
EndIf
Edited by autoitxp

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi

How can i do text match on current active window like im using this code but its nt working prperly

$text=WinGetText("" , "mykeyword")  
if $text   then
MsgBox(0 , "" , "FOUND")
EndIf
$sHwnd = WinGetHandle("")
$sText = WinGetText($sHwnd)
If StringInStr($sText,"mykeyword") Then
MsgBox(0, "", "FOUND")
EndIf
Edited by Manadar

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks dude and wat if need to get multiple keywords like mykeyword1 mykeyword2 mykeyword3

well this works for me any way better or faster then this or it allright ?

$sHwnd = WinGetHandle("")
$sText = WinGetText($sHwnd)
If StringInStr($sText,"mykeyword") or StringInStr($sText,"mykeyword1") Then
MsgBox(0, "", "FOUND")
EndIf
Edited by autoitxp

Share this post


Link to post
Share on other sites

Thanks dude and wat if need to get multiple keywords like mykeyword1 mykeyword2 mykeyword3

well this works for me any way better or faster then this or it allright ?

$sHwnd = WinGetHandle("")
$sText = WinGetText($sHwnd)
If StringInStr($sText,"mykeyword") or StringInStr($sText,"mykeyword1") Then
MsgBox(0, "", "FOUND")
EndIf
That is just fine. :)

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