Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'AppleScripts to monitor and improve fitness' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
AppleScripts to monitor and improve fitness
Authored by: leenoble_uk on Jan 28, '09 01:25:49PM

Original author here again.

Having finally stuck to a running program for 3 months I thought I'd dig out my old iPod scripts and use the circuit run one. However I discovered an annoying limitation of AppleScript.

If you have a gap between waypoints of > 32 seconds then the silence command fails. It actually fails at 32767 (the values are multiplied by 1000 for each second of silence. The script still runs with no errors though, however the period of silence is non-existent.

The fix is to add this code:

			repeat while timeToNextWayPoint > 32
				say "[[slnc 32000]]" using theVoice saving to (newSaveLocation & circuitName & trackNo & ".aif")
				set timeToNextWayPoint to (timeToNextWayPoint - 32)
				set trackNo to trackNo + 1
			end repeat

after the line

if timeToNextWayPoint > 7 then

---
Brought to you by S C Johnson, a family multinational conglomerate.

[ Reply to This | # ]

AppleScripts to monitor and improve fitness
Authored by: palahala on Jan 28, '09 01:54:04PM

Wow, lifetime support! :-)



[ Reply to This | # ]
AppleScripts to monitor and improve fitness
Authored by: leenoble_uk on Jan 29, '09 04:39:39AM

I've actually left a variable in there which isn't defined i the original script. Chop out the circuitName concatenation.

I've modified my script to include the waypoint names and circuit identifiers for ease of identification. Those mods are left as an exercise for the reader.

---
Brought to you by S C Johnson, a family multinational conglomerate.



[ Reply to This | # ]