Yeah you can put a read in there like:

on *:TEXT:$($read(myfile.txt,n)):

But that doesn't work as he wants it to. $read returns a random line, so it would be a different matchtext with every time the on text is triggered, while he wants to have a certain word to trigger for a while, and then switch to another word.