写在PowerShell中下面作为一个快速的iTunes演示:iTunes,在该退出警告消息,由于脚本
$iTunes = New-Object -ComObject iTunes.Application
$LibrarySource = $iTunes.LibrarySource
foreach ($PList in $LibrarySource.Playlists)
{
write-host $PList.name
}
这种运作良好,并拉回到播放列表名称的列表。 但是在试图关闭iTunes时出现警告
一个或多个应用程序正在使用iTunes脚本界面。你确定你要退出吗?
很显然,我可以忽略该消息,然后按[退出]或等待20秒左右,但有没有一种干净的方式告诉iTunes我已经完成了它的工作?
Itunes 7.7.1, Windows XP
PowersHell - 我喜欢它:) – samjudson 2008-09-10 13:22:37