最近突然爱上用Mac听Podcasts,有时一听就是整半天,不过节目中难免有一些段落或听过的部分需要跳过,但iTunes又没有快进功能,还好又让小编遇到了一个解救技巧,那就是Applescript,这货真的是无所不能,能够控制Podcasts播放速度,还能调用具备快进/快退功能的Quicktime来播放Podcasts节目,来看脚本内容:
tell application "iTunes" set setupNeeded to false --fetch prior selected playlist name and playback rate try set targetPlaylistName to do shell script "defaults read com.jeffporten.fastpodcast SelectedPlaylist" set playbackRate to do shell script "defaults read com.jeffporten.fastpodcast PlaybackRate" on error -- probably first run of script set setupNeeded to true end try if setupNeeded is false then -- confirm using last settings set userReply to button returned of (display dialog "Play playlist \"" & targetPlaylistName & "\" at " & playbackRate & " speed?" buttons {"Cancel", "Change...", "OK"} default button "OK") if userReply is "Change..." then set setupNeeded to true end if if setupNeeded is true then -- set up new settings set listPlaylists to the name of every playlist set targetPlaylistName to (choose from list listPlaylists with prompt "Which playlist to play?" without multiple selections allowed and empty selection allowed) as text set selectedSpeed to button returned of (display dialog "Playback rate to use?" & return & return & "(½X and 2X correspond to iPod playback speeds, actually 75% and 150%)" buttons {"Custom", "½X", "2X"}) if selectedSpeed is "2X" then set playbackRate to 1.5 else if selectedSpeed is "½X" then set playbackRate to 0.75 else set playbackRate to text returned of (display dialog "Enter a playback speed. (1.0 is normal speed, 2.0 is true double-speed, 0.5 is true half-speed.)" default answer "1.0") end if end if --store settings in a non-AppleScripty way do shell script "defaults write com.jeffporten.fastpodcast SelectedPlaylist " & (quoted form of targetPlaylistName) do shell script "defaults write com.jeffporten.fastpodcast PlaybackRate " & (quoted form of (playbackRate as text)) --actually do the playback in QuickTime Player set targetPlaylist to playlist targetPlaylistName set trackList to tracks of targetPlaylist repeat with i from 1 to count trackList set thisTrack to item i of trackList set podcastName to album of thisTrack set thisLoc to location of thisTrack set thisDuration to duration of thisTrack tell application "QuickTime Player" activate open thisLoc play document 1 set rate of document 1 to playbackRate --if some podcasts should never be rate-altered, delete last line and use this instead --if (podcastName does not contain "Onion") then set rate of document 1 to 1.5 --or for multiple podcasts, add as many of these as you like before "then set rate": --and (podcastName does not contain "someOtherPodcast") set nextTrack to false set j to 0 --if the QTP player is manually ended by dragging the slider to the end, automatically starts next podcast --if QTP player is closed, script errors out of existence --otherwise, when playback is finished, script will close the QuickTime Player document and open the next track in the playlist repeat until nextTrack is true delay 2 if current time of document 1 ≥ duration of document 1 then set nextTrack to true end repeat close document 1 end tell --mark the track as played set played count of thisTrack to (played count of thisTrack) + 1 --I use this AppleScript line to set the rating of the podcast track to one star, which I delete later from a smart playlist --set rating of thisTrack to 20 end repeat end tell
粘入Applescipt,点击“运行”
在第一个弹出框中选择播放速度,有1/2X和2X两种,分别是实际速度的75%和150%
或是选择“Custom”自定义速度,中间会让你选择播放列表,选择“Podcasts”即可,输入以0.5为增量的数值可以定义自己需要的快进速度
确认点“OK”
定义的速度会立即通过Quicktime实现,在恢复普通播放速度后,你还可以使用Quicktime的快进/快退键控制播放进程。
暂无评论
24小时热文
刚刚被浏览过的文章
515335次阅读
337379次阅读
263222次阅读
238220次阅读
214568次阅读
随机显示站内文章
15853次阅读
1337次阅读
9165次阅读
1648次阅读
软件下载频道
- Apple
- FTP 工具
- GIF 生成
- PDF 文档操作
- SetApp
- Today Widget
- Touch Bar
- 下载工具
- 书签收集
- 书籍管理
- 二维码工具
- 云同步
- 交互设计
- 任务管理
- 位置定位
- 信息管理
- 创意工具
- 剪切板
- 办公套件
- 动画设计
- 包裹追踪
- 医疗工具
- 单位转换
- 双11特惠
- 反病毒
- 团队协作
- 图标生成
- 图标管理
- 图片处理
- 图片拼接
- 图片标注
- 图片浏览
- 壁纸管理
- 多媒体工具
- 天文研究
- 天气预报
- 字体管理
- 字幕工具
- 学习卡
- 密匙管理
- 密码管理
- 屏幕保护
- 屏幕取色
- 屏幕录制
- 屏幕截图
- 屏幕解锁
- 工程管理
- 平面设计
- 开发软件
- 影片管理
- 影音播放
- 快速录音
- 思维导图
- 打印工具
- 批量重命名
- 效率工具
- 数据传输
- 数据备份
- 数据恢复
- 文件上传
- 文件压缩
- 文件搜索
- 文件比对
- 文件清理
- 文件管理
- 文本格式转换
- 文档演示
- 文档管理
- 文档编辑
- 文档识别
- 文档阅读
- 新闻订阅
- 日历工具
- 时间追踪
- 格式转换
- 歌词获取
- 测绘工具
- 浏览器
- 浏览器插件
- 游戏
- 热键工具
- 版本控制
- 理财工具
- 电量管理
- 界面定制
- 硬件增强
- 磁盘工具
- 磁盘数据拷贝
- 社交客户端
- 程序安装
- 窗口管理
- 笔记管理
- 系统优化
- 系统增强
- 系统监控
- 纯写作
- 网络工具
- 翻译软件
- 聊天工具
- 联系人管理
- 虚拟机
- 虚拟现实
- 表情包
- 视频会议
- 视频同步播放
- 视频监控
- 视频编辑
- 计算器
- 语音识别
- 软件卸载
- 输入法
- 运动信息
- 远程控制
- 邮件客户端
- 闹铃提醒
- 防休眠
- 防干扰
- 音乐制作
- 音频制作