keywordlist := "orange,blue,green,purple,white,black,yellow,red"
Sentence := "Please click on the BLUE, ORANGE, GREEN, YELLOW, BLACK, WHITE, RED square to continue"
; StringReplace Sentence, Sentence, `,, %A_Space%, A
SetTitleMatchMode, 2
IfWinExist, Firefox
WinActivate
Loop Parse, Sentence, %A_Space%
{
WordToTest := A_LoopField
; Msgbox % WordToTest
Loop Parse, keywordlist, `,
{
KeyWord := A_LoopField
; Msgbox % KeyWord
If (InStr(WordToTest, KeyWord, False))
Msgbox Color found : %WordToTest%
}
}
exitapp
That is my script for Auto Hot Key.
I am wondering where I went wrong. I want it to:
1. Activate Window
2. Search for a sentence on web page.
3. Find keyword in webpage.
As you can see in the script what the sentence is and the keywords. Where did I go wrong? It doesn't seem to want to search the page. It brings the webpage to the front.

New Topic/Question
Reply




MultiQuote



|