Jump to content

Recommended Posts

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
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
Posted

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. :)

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
×
×
  • Create New...