Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

orbdrums

macrumors member
Original poster
Dec 13, 2008
78
0
I want to create a timer with a Mac. Would AppleScript be the route and, if so, do I have to re-create the wheel or is there one included with Mac OS X?
 
One that will take an input field (like 15 for 15 seconds) and countdown from 15 to zero and then sound an audible alarm.
 
It works great. Now I need to enhance the the interface. Thanks man.
 
I'm thinking that I can convert seconds to minutes and have the time count down with some kind of onscreen display? instead of having the code do everything in the background?
 
From what I understand, AppleScript on it's own can't do very much. It can use other frameworks that you might have to make (http://macscripter.net/viewtopic.php?id=32292 is an example but the sample file in post 2 is gone).

I'm guessing you want a countdown timer. The only way I can think of is rather obtrusive":

Code:
set input to text returned of (display dialog "Enter length of timer" default answer "")
set countdown to input
repeat input times
	display dialog "Time left: " & countdown giving up after 1
	set countdown to countdown - 1
end repeat
beep
 
  • Like
Reactions: bozo_z_clown
Thanks again for your help. I agree, obtrusive (and intrusive) would be correct. I launched your code and it took refresh time to commit. I will look more in to xCode for the solutions I need. I'm new to Mac and I certainly appreciate your input. It's people like you that make Apple great.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.