Is it possible to search for a specific sentence, then click a position based off of that sentence? With other actions to follow? [New to AutoHotkey, just want to know if it is possible]

Sorry for taking so long to get back to you. I have it set up and working how I want! The only possible thing I'll try to do in the future is if it finds the first sentence, I want it to do the stuff, then go to the second sentence and do stuff, and then check for the first sentence again before moving onto #3, #4, and so on. The first sentence is priority, and I'd like to have it check for it each time and execute those commands if possible.

Anyway, I had to remove some of the text specific stuff but here is my code. I'm sure it is messy since it is my first time coding, but I'll look to clean it up in the future:

#z::
wow:
Loop 
{
textArray := {}
textArray.aText := "asdfsadfasdfas"
textArray.bText := "ahjdjdgjadgjdjdajdaj"
textArray.cText := "adjgjgdajhadgjadj"
textArray.dText := "afdhdafgjadfjafdj"

Random, miniRoll, 50, 60
Random, smallRoll, 2000, 3500
Random, mediumRoll, 5000, 6500
Random, bigRoll, 1250000, 1260000

copyText()
{
    SendInput {HOME}
    sleep, smallRoll
    Click 783, 286
    sleep, smallRoll
    SendInput {CTRL down}
    sleep, miniRoll
    SendInput {a}{CTRL up}
    sleep, smallRoll
    SendInput {CTRL down}
    sleep, miniRoll
    SendInput {c}{CTRL up}
    sleep, smallRoll
}

copyText()
AIndex = 0

outer:
For storeKey, storeValue in textArray
{

AIndex++    
found := AIndex

    If(InStr(Clipboard,storeValue) > 0)
    {
        SendInput {CTRL down}
        sleep, miniRoll
        SendInput {f}{CTRL up}
        sleep, smallRoll
        SendInput %storeValue%
        sleep, smallRoll
        SendInput {ESCAPE}
        sleep, miniRoll
        SendInput {ENTER}
        sleep smallRoll

        If(found = 1)
        {
            sleep, mediumRoll
            Click 253, 241
            sleep, bigRoll
            SendInput {CTRL down}
            sleep, miniRoll
            SendInput {w}{CTRL up}
            sleep, mediumRoll
            SendInput {HOME}
            sleep, smallRoll
            SendInput {CTRL down}
            sleep, miniRoll
            SendInput {r}{CTRL up}
            sleep, mediumRoll
            copyText()
            continue outer

        }
        else if(found = 2)
        {
            sleep, mediumRoll
            Click 264, 197
            sleep, bigRoll
            SendInput {CTRL down}
            sleep, miniRoll
            SendInput {w}{CTRL up}
            sleep, mediumRoll
            SendInput {HOME}
            sleep, smallRoll
            SendInput {CTRL down}
            sleep, miniRoll
            SendInput {r}{CTRL up}
            sleep, mediumRoll
            copyText()
            continue outer
        }
        else if (found = 3)
        {
            sleep, mediumRoll
            Click 265, 239
            sleep, bigRoll
            SendInput {CTRL down}
            sleep, miniRoll
            SendInput {w}{CTRL up}
            sleep, mediumRoll
            SendInput {HOME}
            sleep, smallRoll
            SendInput {CTRL down}
            sleep, miniRoll
            SendInput {r}{CTRL up}
            sleep, mediumRoll
            copyText()
            continue outer
        }
        else if (found = 4)
        {
            sleep, mediumRoll
            Click 265, 239
            sleep, bigRoll
            SendInput {CTRL down}
            sleep, miniRoll
            SendInput {w}{CTRL up}
            sleep, mediumRoll
            SendInput {HOME}
            sleep, smallRoll
            SendInput {CTRL down}
            sleep, miniRoll
            SendInput {r}{CTRL up}
            sleep, mediumRoll
            copyText()
            AIndex = 0
            Goto wow 
        }
        else if (found > 4)
        {
            AIndex = 0 
            Goto wow
        }
    }       
}
return
}
/r/AutoHotkey Thread Parent