Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

NightStorm

macrumors 68000
Original poster
Jan 26, 2006
1,860
66
Whitehouse, OH
Trying to create a script that will login an iTunes account and automatically register it with iTunes Match. The reason behind the script is that my wife and I share a single iTunes library while maintaining separate iTunes accounts. I have iTunes Match, but have to re-enable it every time she logs me out.

I'm assuming the easiest way to accomplish this is through GUI scripting, but I haven't been able to figure out how to call the "Add This Computer" button (see attachment). Any help would be greatly appreciated!
 

Attachments

  • itunes.png
    itunes.png
    271.5 KB · Views: 102
Last edited:

tkermit

macrumors 68040
Feb 20, 2004
3,582
2,909
Not pretty, but this should work:

tell application "System Events"
tell process "iTunes"
click button "Add This Computer" of group 3 of UI element 1 of scroll area of splitter group of window 1
end tell
end tell
 

NightStorm

macrumors 68000
Original poster
Jan 26, 2006
1,860
66
Whitehouse, OH
Not pretty, but this should work:

tell application "System Events"
tell process "iTunes"
click button "Add This Computer" of group 3 of UI element 1 of scroll area of splitter group of window 1
end tell
end tell

Thank you!

Really wish iTunes would allow you to always keep iTunes Match enabled for an account, regardless of what account is logged into the store (kinda like they do with home sharing). Until that happens, this will help!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.