This is how you quit iTunes:
Code:
tell application "iTunes"
quit
end tell
I'm not sure if you want some sort of background process (agent) that is always running, keeping an eye out to see if iTunes is running. And, whenever it opens, to close it, to prevent if from
ever running If so, then, you need to run your AppleScript in some sort of loop. Here is some pseudocode to do so:
Code:
while (true) { // always run
tell application "iTunes"
quit
end tell
sleep 10 seconds // sleep so that you don't hog the CPU for no reason
}