限制铃声长度 AppleScript
我有下面显示的 AppleScript 代码,它告诉 iTunes 转换所选曲目。我想知道如何限制要转换的曲目的长度?
tell application "iTunes"
set theFiles to the selection
repeat with theTrack in theFiles
with timeout of 120 seconds
set theSecondTrack to first item of (convert theTrack)
I have the AppleScript code shown below which tells iTunes to convert the track from the selection. I was wondering how I would limit the length of the track that will be converted?
tell application "iTunes"
set theFiles to the selection
repeat with theTrack in theFiles
with timeout of 120 seconds
set theSecondTrack to first item of (convert theTrack)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想通过 iTunes GUI 限制转换后的曲目的长度,您可以在“获取信息”>“选项”中设置原始曲目的“停止时间”。相应的 AppleScript 属性是
finish
(属于track
类)。因此,重复循环中的步骤应该是:
示例 60 秒限制:
If you wanted to to limit the length of the converted track via the iTunes GUI, you would set the "Stop Time" of the original track in Get Info>Options. The corresponding AppleScript property for this is
finish
(of thetrack
class).So the steps in your repeat loop should be:
Example 60-sec limit: