Commnd C shell script?
The command "caffeinate" will indefinitely keep your mac from going to sleep, to get out of this you must press Control+C. How would I make a shell script for AppleScript to imitate the keyboard action control+c to quit the "caffeination" at a desired time?
do shell script "caffeinate"
delay 10 --not actual script, just an example
--end caffeination
MacBook Pro, OS X Mountain Lion (10.8.2), 2.3 GHz i5, 4GB RAM, OCZ 120GB SSD