Hi all
I am very new to AS.
I am trying to work on a script Michael McCracken wrote which takes the current time in a paused Quicktime movie and appends it to an open VoodooPad document. Here it is:
tell application "QuickTime Player"
set theMovie to document 1
pause theMovie
set ctime to current time of theMovie
set tscale to time scale of theMovie
set tseconds to (ctime / tscale)
set str_minutes to (tseconds / 60 div 1) as string
set str_seconds_left to (tseconds mod 60 div 1) as string
set theString to str_minutes & ":" & str_seconds_left & " - "
tell application "VoodooPad"
append text theString to page "Movie" of document 1
end tell
end tell
Okay. Now this works fine, I can call it in Quicksilver (via a trigger) and it will pop the time in my VP doc. My problem is the format the numbers are in.
I’d like to have it as a proper timecode format HH:MM:SS.
However this script inserts the time in a short form, as 9.23 for 9 mins and 23 secs and not 00:09:23.
Is there someway I can set the individual str_minutes and str_seconds to be formatted as double digits always? Or is that something I’d have to have VoodooPad offer, be scriptable and then call that?
And can people suggest how to add in hours here?
Model: MBPro 2.33 core two duo
Browser: Firefox 2.0.0.9
Operating System: Mac OS X (10.5)