Applescript repeat ends too early
I'd like to have my computer automatically take a screenshot of a specific webpage and save it to an rtfd document for an hour every five minutes.
However, it seems that I cannot place all of my codes between "repeat 11 times" and "end repeat" as error "Syntax Error; Expected “end” but found “to”." keeps showing up highlighting that "to"
Replacing that "to" with "end" according to the error message will simply end up with a loop for only the "set input method to ABC" section, which is not what I'm expecting.
Please help me figure out whether there's something I've done wrong or it's a Script Editor bug and, if possible, kindly offer a solution.
Much obliged.