Time

Hey guys im trying to make my program MultiAlarm prevent a sleep so what i came up with was to make it schedule a wake up every 10 seconds or so, my problem is making the time have a extra 10 seconds on it

on getShell(thecmd)
	set theName to thecmd
	return {theName}
end getShell
set the_date to getShell(do shell script "date -u +%m/%d/%y")
set the_time to getShell(do shell script "date +%H:%M:%S")

do shell script "sudo pmset schedule wakeorpoweron \"" & the_date & " " & the_time & "\" \"MultiAlarm\"" with administrator privileges

Your computer won’t sleep if you’re actually doing something (like pressing keys). Perhaps this approach would work for you (in a loop with a 10 second delay:

tell application "System Events" to keystroke "" using {control down}

The same as keying the control key down which wakes up my machine.

If a space won’t screw up other things (i.e. go somewhere you don’t want it) then

tell application "System Events" to keystroke space -- the same as the space bar

might work for you too.