阅读181 返回首页    go iPhone_iPad_Mac_apple


How can I applescript itunes preferences on Mac

I am trying to write applescript to turn off itunes library sharing on my Mac (see below for why, if you are interested).

 

I have checked the iTunes dictionary, and AFAICT there's no command to do this (but if I'm wrong, please let me know!).

 

So I was trying to use accessibility to push buttons on the preferences window for iTunes.  Here I have run into a new problem: I have not been able to get the iTunes preferences window object.  When I have the preferences window open, and I ask iTunes for all of its windows as below:

tell application "iTunes" to get name of windows

...all I see is {"iTunes"}, although there are definitely two windows open.  Web searches have pointed me to applescripts that claim to find all the windows of an application, but none of them seems to find this one.  Any help would be very much appreciated.



P.S. Forgot to explain: I started to search for a solution to this problem because I was disturbed to find that because I was sharing my library on my home network and at work, I was also sharing it, e.g., on hotel wifi.  Looking for quick ways to toggle this preference when I'm traveling.



It could well be a feature that you cannot configure through scripting. See https://dougscripts.com/itunes/infocont.php for some pointers on iTunes and AppleScript.

 

tt2



最后更新:2017-09-11 22:55:50

  上一篇:go macbook locks up at start
  下一篇:go Why is iTunes pricing so much more than Amazon