这是AppleScript;我知道你没有使用它,但我不知道如何使用Scripting Bridge来做到这一点。据我所知,该方法应该是相似的,但更接近Objective-C语法。
tell application "iTunes"
set this_time to time of current track as string
set elapsed_seconds to player position
set this_elapsed_minutes to round elapsed_seconds/60 rounding down
set this_elapsed_seconds to elapsed_seconds mod 60
if {1, 2, 3, 4, 5, 6, 7, 8, 9, 0} contains this_elapsed_seconds then
set this_elapsed_seconds to "0" & (this_elapsed_seconds as string)
end if
end tell
return (this_elapsed_minutes & ":" & this_elapsed_seconds & " of " & this_time) as text --
这个问题需要一些更多的信息,请。 – 2012-07-24 18:46:17
您的要求提供更多信息需要更多信息。 – Greg 2012-07-24 19:33:53