autoitxp Posted December 4, 2007 Share Posted December 4, 2007 (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 December 4, 2007 by autoitxp Link to comment Share on other sites More sharing options...
jvanegmond Posted December 4, 2007 Share Posted December 4, 2007 (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 December 4, 2007 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
autoitxp Posted December 4, 2007 Author Share Posted December 4, 2007 (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 December 4, 2007 by autoitxp Link to comment Share on other sites More sharing options...
jvanegmond Posted December 4, 2007 Share Posted December 4, 2007 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") EndIfThat is just fine. github.com/jvanegmond 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