begin
while true do begin
<your stuff you wanna repeat here>
end
end.
Also, check out the existing topic about adr scripts. The answer to your question was given there already :)
1: depends on what type of dialogue box it is. If it's tutorial window no. If dialogue box, yes. Engine.DlgSel('whatever')
2: You gotta have spawnpoints in all cities/the city you know you will be in. Eg. if you soe from somewhere near Giran you will end up in one of the n spawnpoints in Giran. See adr scripting guide for how to use 'inrange' command.
3: yes. Again, see scripting manual. Hint: QuestStatus
4: no