Re: Precise timing
Re: Precise timing
- Subject: Re: Precise timing
- From: kai <email@hidden>
- Date: Sun, 30 Oct 2005 11:03:43 +0000
On 29 Oct 2005, at 07:52, Gil Dawson wrote:
Hi--
I'm trying to get my lyrics to scroll with my CD, but the timing
isn't precise enough. I was wondering whether anyone might kow of a
better way to time my pulses.
on idle
tell application "Microsoft Word"
tell window 1
small scroll down 1
end tell
end tell
return 0.7
end idle
I match the lyrics to my scrolling speed by inserting blank lines
into my lyrics. M ostly, it works fine.
The problem is that the time between scrolling pulses is not as
uniform as I would like. If it were sometimes early and sometimes
late, that would be OK so long as it evened out after a few lines.
But it isn't. Sometimes it's 'way late and never catches up.
Is there another way to fire off a command, a way that is more tied
to a timer?
I suppose you could try comparing the number of scrolls with the
actual time elapsed, Gil. Untested - but perhaps something like this:
--------------------
property startDate : missing value
property totalScroll : 0
property scrollPause : 0.7
on idle
tell ((current date) - startDate) div scrollPause
set currScroll to it - totalScroll
set totalScroll to it
end tell
tell application "Microsoft Word" to tell ¬
window 1 to small scroll down currScroll
scrollPause
end idle
set startDate to current date
set totalScroll to 0
--------------------
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden