Run applescript when airtunes speaker selected in iTunes

Hi,
I have a project that involves creating a whole house audio system using airport expresses and an iphone.
So far so good, best and most cost effective solution.
As I have an AppleTV I want to leverage it as a place to stream through my A/V receiver. This requires me to manually turn on the receiver, select the 'B' speaker output of the receiver (which connects to stereo speakers instead of the 5.1 satellite speakers which are the 'A' speakers), select the correct input for the AppleTV etc etc.
I know its not that hard but if you are reading this then you too probably know the warm fuzzy feeling of it all working seemlessly (no comments on this line please......)
So here's the plan. When I select the "AppleTV" in the speaker menu at the bottom of iTunes (which appears when you have multiple airtunes speakers connected) I want it to run a script that will control a device that beams all of the signals to the A/V receiver to set it up correctly.
The device is probably another problem to tackle, most likely an arduino project in an arduino forum, but I need a script to initiate this that is triggered by the selection of the speaker in itunes.
Does this sound possible?
Dave

Hi Camelot,
I used the accessability inspector and got the following report on the airtunes speaker button:
<AXApplication: “iTunes”>
<AXWindow: “iTunes”>
<AXButton: “Apple Hifi (2)”>
Attributes:
AXRole: “AXButton”
AXRoleDescription: “button”
AXSubrole: “(null)”
AXDescription: “”
AXHelp: “Choose which speakers to use.”
AXEnabled: “true”
AXFocused: “false”
AXParent: “<AXWindow: “iTunes”>”
AXWindow: “<AXWindow: “iTunes”>”
AXTopLevelUIElement: “<AXWindow: “iTunes”>”
AXPosition: “x=1692 y=1104”
AXSize: “w=124 h=20”
AXTitle: “Apple Hifi (2)”
AXSortDirection: “(null)”
Actions:
AXPress - press
Can you point in the direction of creating a script to query if the speaker "Apple Hifi (2)" is active? My applescripting is at a basic level and i'd like to learn some more.
Thanks
Dave

Similar Messages

  • Airtunes speaker show in iTunes, but never connects

    Help. There is no diagnostics, nothing.
    My airtunes speakers show in iTunes, but when I go to connect to them to play sound through them it never connects.
    What can I do to find the problem, let alone fix it?

    You did not mention if you receive an error message or not, or even if your connection did in fact work fine at some point, or if you tried using Airport set-up or if you verified your overall connection settings etc, etc - it's helpful to add these kinda details otherwise you can have any number of issues going on, some may not even relate to your base station or AX (airport express/air tunes) - That said, I'll toss a suggestion into the proverbial ring.
    Go to your Airport Admin Utility (Applications>Utility>Airport Admin Utility) and check that your main base station and AX appear in the list of stations, which they should. Select the AX you use to connect to your stereo/speakers, a new window will open, you may be asked to enter your password.
    From the tabs along the top of the new window that opened, select Internet. See that your >Configure option is set to 'Using DHCP.' Save and try to connect to your speaker.
    If this does not work, post back with details about your situation - What you offered in your initial query is totally too vague. What does "There is no diagnostics, nothing." mean anyway?
    Hope this helps, good luck.

  • Running xp, when i try to upgrade itunes from 11.0,0,163 to 11.0.4 it says itumes has invalid signature, will not be installed

    i'm running xp - when i try to upgrade itumes, my computer says itunes has an invalid signature - try manual - so i do and get the same message - i know i've upgraded itunes before successfully - what does this mean?

    Hi curliejo, 
    Welcome to the Apple Support Communities!
    In your situation I would recommend the steps in the following article for troubleshooting iTunes. It may be necessary to completely remove and reinstall iTunes in this situation. Be sure to remove all of the components with iTunes in the correct order as outlined in the article before installing fresh. 
    Issues installing iTunes or QuickTime for Windows
    Have a great day, 
    Joe

  • Airtunes Speaker Selection

    Why is it that when you select a different set of speakers than your own computer, it mutes iTunes coming out of the earphone jack? What if I have another stereo connected to my computer and I want music in both places? Anyone know a workaround?

    The reason it mutes the audio on the computer is that there's a significant delay as iTunes reads up the audio file, decodes it, re-encodes it as Apple Lossless, encrypts it, sends it to the AirPort Express, the AX decrypts it, decodes it, and sends it to the speakers. Almost a second on my G5 iMac. So there'd be an echo effect between the computer and the AirPort Express.
    best,
    charlie

  • "whoosh" sound when making a selection in iTunes.

    Since the ver 8 upgrade I've noticed a low "whoosh" type sound when I move between fields and when I select a new song in a playlist. It is like some sort of "selection verification" sounds. It is pretty annoying -- it seems to be a bit delayed and sometimes it goes off 2 or 3 times for no real reason. I tried to find some way to turn it off but to no avail. how do I turn it off? Assistance would be greatly appreciated.

    I found the fix on the post listed above. I have the Wacom Bamboo tablet -- I use it in PhotoShop. I followed the below instructions and it fixed the problem. There are several other possible solutions on this post. Anyway, here is the post that helped me:
    SOLVED the problem on my Vista 64 machine. I use a Wacom tablet in Photoshop and it automatically activates Vista's Tablet input software which is uanessacry because you control the tablet options in Wacom's software anyway.
    Go to Control Panel > Programs and Features. Click on Turn Windows Features On or Off. Scroll down to "Tablet PC Optional Components" and uncheck the box. It will take a few minutes and then display a restart dialog box. Restart and Voila!<<
    Good luck to all!

  • X-fi fatal1ty device not detected when running speaker selection wizard

    Gx-fi fatalty device not detected when running speaker selection wizard? ?
    System is a custom build, based off an ASUS A8N-SLI Premium, with two GTX7800 display cards. in a SLI configuration
    Fresh installation fo Windows XP Profesional with SP3 slipstreamed.
    Origional CD fails to detect the card, claiming a supported device is not present.
    This card has worked prevously, and is verified as fully functional in windows Vista. ?
    Please note Windows Vista can not be used.
    I have tried about 30 different versions of the drivers (each on a clean installation) and used both clean and dirty boots, and nothing is working.
    Before anyone points me at other threads in this forum, please note i have been scouring this forum for the past week trying every sugestion there is, and I have raised a ticket with Creative (who despite the prommise of a 2 day responce, have yet to respond)
    I have tired multiple versions of the NForce drivers, NVidia display drivers, Creative Drivers, Bios updates, Chipset hacks and more.
    does anyone hav a sugestion that is not already posted on this forum.

    Tried it on one of the spare PC's in the house earlier (Nforce 2 based) - still no recognition of the card whatsoever, it's as if it doesn't exist.
    I'm guessing that the card is pretty much toasted eh?
    --Jakk

  • Sound drops only when using one Airtunes speaker

    Hello,
    When i connect to one Airport Express with Itunes, the sound drops every 3 seconds. But when i connect to multiple Airtunes speakers or one Airtunes speaker plus the pc speaker everything works fine.
    -Both Airport Express stations are connected via a wireless router trough the ethernet port and have the wireless disabled. (pc --[wireless]-> Router --[ethernet]-> Airport1 & Airport2)
    -i've used different settings buffer sizes.
    I've searched the discussion but found nothing about the same problem. Can someone help me with this issue?
    Thanks
      Windows 2000  
      Windows 2000  
      Windows 2000  
    dell   Windows 2000  

    well, what'd you do to fix it? was it a bad headphones cable/jack or just not plugged in all the way?

  • Itunes plays automatically when bluetooth speaker connected

    Whenever I turn on my Ravon Gem bluetooth speaker, it starts playing whatever is selected in iTunes. This even happens if there is a rented movie selected. A couple of times this has happened when I wasn't ready to start watching the movie yet. It doesn't ask if I want to start the movie now. This also happens if I am watching or listening to something other than iTunes when I turn my speaker on. Then I get 2 things going at once. I can find nothing in prefs to change this behavior.

    same problem here!
    using:
    Bose Soundlink Mini
    Macbook Pro 13-inch, Early 2011)
    OS X 10.10.1

  • After installing the maverick i get this message when i try to open   iTunes: If you want to run i 64bits modus you must remove the mark:Open in 32bits modus.But i have removed the 32bits and i still can't get it to work!Have maces

    after installing maverick i get this message when i try to open itunes:Unmark the 32bits modus-but i have unmarked it several times!The new iTunes requires 64bits modus so what shall i do?

    I upgraded my 2007 iMac (20") to Maverick. Should never have done this! Lost mail, lost my mail archive, lost numerous programs/applications, lost all my installed hardware, spend 4 days on getting it running again with the (supreme) help of Apple Care. However it should not have happened at all!
    iMac Computers with less than 4Gb of internal memory (as explained by Apple Care), or less than (estimated) 150Gb of free disc-space should not upgrade! Simple as that and the App Store should warn you about that and not simply let you pick up your free copy of Maverick!

  • Itunes update would not install due to an error, now itunes won't run and I get this message when I try to launch itunes: "This application has failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem"

    itunes update would not install due to an error, now itunes won't run and I get this error message when I try to launch itunes: iTunes.exe - Unable to Locate Component "This application has failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem."
    I'm on a Dell PC running Vista Home Premium.
    HELP!!!!!!!!!!!!!!!!!!!

    try removing all itunes and all other apple program
    follow this link for more info. http://support.apple.com/kb/HT1923
    reboot ur window after uninstalling
    after that download the latest itunes setup and install.

  • When I purchase music through iTunes from my MacBook Pro, my iPhone 4 iTunes app cannot detect those purchase to allow them to download to my phone. If I open up the iTunes app and select "purchased music not on this iphone" it tells me "All of your a

    When I purchase music through iTunes from my MacBook Pro, my iPhone 4 iTunes app cannot detect those purchase to allow them to download to my phone. If I open up the iTunes app and select "purchased > music > not on this iphone" it tells me "All of your available music has been downloaded to this device." However, my purchases are not yet downloaded to the iphone and not available to download. If I go to "purchased > music > all > recent purchases" it will show me the purchases that were most recent the last time I synced my phone, but not the purchases since then.
    Any thoughts on how I can remedy this and make all of my purchased music available on my phone without requiring syncing?
    iPhone 4

    So I have been searching the iStore for Airplay and I find lots of information about what it is, but nothing about how much it costs, how/where to buy it, etc.?
    Fortunately, AirPlay does not cost anything as it is a streaming protocol used by Apple. Currently, the AirPort Express and Apple TV are AirPlay-ready. A number of other companies, like JBL, iHome, Denon and Klipsch are also rumored to be working on AirPlay versions of their products.
    Your other option would be to get an AirPort Express and connect it to your Onkyo analog or optical digital audio input and stream from iTunes that way. I currently do this with my 10+ year old Harmon Kardon HT receiver.

  • Please help! when i try to open itunes get this"an app has mad an atempt to load the c run time library incorectly please contact the app support team for more info"

    Hi everyone I was wondering if someone can help with this issue please. When i tried to open itunes in my laptop that is running on windows xp i get this error message " program c:/program files/itunes/itunes.exe
                     RC034
                     an application has made an attempt to run the c runtime time library incorrectly
                     please contact the aplication support team for more information."

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99199)

  • It says this when I try to open iTunes:  Apple Application Support was not found.   Apple Application Support is required to run iTunes. Please uninstall iTunes, then install iTunes again.   Error 2   I've tried uninstalling it and installing it several t

    It says this when I try to open iTunes:
    Apple Application Support was not found.
    Apple Application Support is required to run iTunes. Please uninstall iTunes, then install iTunes again.
    Error 2
    I've tried uninstalling it and installing it several times. I've tried to download Apple Application Support separately but it just says:
    An error occurred during the installation of assembly 'Microsoft.VC80.CRT,version="8.0.50727.4... Please refer to Help and Support for more information. HRESULT:0x800736FD

    You have missing information in your Windows programming. 
    You need to repair your computer so it can run iTunes.  If you plug those error codes into your browser you may get an answer.

  • When i first created my itunes account it selected the local country i lived in, now i have changed countries and it does allow me to buy any apps as the credit card is not valid in that country. what do i do?

    When i first created my itunes account it selected the local country i lived in, now i have changed countries and it does allow me to buy any apps as the credit card is not valid in that country. what do i do?

    You will need to sign into your account using the iTunes app on your Mac or PC and change the region/country for your account. If you do not have a bank card for the new country, you should be able to make purchases with iTunes Gift Cards if they are available in the new country.

  • I am trying to update my iTunes to 10.5.1 so that I can upgrade my 3GS phone but am getting the following error message when trying to install the itunes:Install step failed: Run pre upgrade script for apple mobile device support. Contact software manufac

    I am trying to update my iTunes to 10.5.1 so that I can upgrade my 3GS phone but am getting the following error message when trying to install the itunes: Install step failed: Run pre upgrade script for apple mobile device support. Contact software manufacturer for assistance. I am on a MacBook pro running 10.5.8 OS. Has anyone seen this before and how can I get it resolved.
    Thanks for your help in advance....

    Did you ever figure out the problem? "Contact Software Manufacturer"?? That sounds ominous... I've got the same issue and I'm pretty durn aggravated right about now....
    Thanks!

Maybe you are looking for