iTunes Applescript Help

Discussion in 'Mac Applications and Mac App Store' started by NightStorm, Dec 16, 2012.

  1. NightStorm, Dec 16, 2012
    Last edited: Dec 16, 2012

    macrumors 68000

    Joined:
    Jan 26, 2006
    Location:
    Whitehouse, OH
    #1
    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!
     

    Attached Files:

  2. macrumors 68030

    tkermit

    Joined:
    Feb 20, 2004
    #2
    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
     
  3. thread starter macrumors 68000

    Joined:
    Jan 26, 2006
    Location:
    Whitehouse, OH
    #3
    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!
     

Share This Page