Launch radio function in Spotify through applescript?

Hi all,
I'm trying to make a script that will start the radio function in spotify of the track that is currently playing
I'm gonna use it for a prototype in school project in interaction design, so it just have to work. Doesn't have to be elegant :-)
I've tried using accessibility inspector and looked at some GUI scripting tutorials for applescript, but it's still a bit above my coding skills
I tried to make it with automator as well, but the recording function doesn't seem to work with it
I've unlocked applescript, automator, finder and system events in system preferences so that they have permission to control the GUI, but can't get it to work
Any ideas? Struggling with the syntax here.
Tried this code, but i don't know how to access the context menu that appears when you right click on the track that is played:
tell application "Spotify"
  activate
end tell
tell application "System Events"
  tell process "Spotify"
  click menu item "Start Radio" in menu bar
  end tell
end tell

Hm, not sure what happened with the formatting. It looks like this:
tell application "Spotify"
  activate
end tell
tell application "System Events"
  tell process "Spotify"
  click menu item "Start Radio" in menu bar
  end tell
end tell

Similar Messages

  • How can I create a new Numbers Document through AppleScript?

    How can I create a new Numbers Document through AppleScript?
    I try this:
    tell application "Numbers"
    make new document with properties {template name:"blank"}
    end tell
    But don't work.
    Where can I find documentation about it?
    Thanks

    If you try to invent your own syntax, you are starting on very wrong basis.
    The required syntax is defined by the Numbers AppleScript's dictionary.
    This one doesn't know what is a template.
    This is why, in the link posted by badunit, I use an other scheme to create a new document.
    I know that it's awful but it's the only one available at this time.
    Yvan KOENIG (VALLAURIS, France) samedi 4 juin 2011 11:25:25
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Third party system call function module/BAPI through RFC to update Z table

    Dear Friends,
    We have a third party system which directly inserts a Z table in SAP through its programming, which is an auditing issue.
    We want the third party system should call function module/BAPI through RFC so that the Z table gets updated.
    waiting for inputs..
    Thanks,
    Kumar

    if third party system is capable of making Remote Function call, then writing a Function module & making it remote enable is not difficult task in ABAP.
    You may have to prepare specifications first to decide if third party system is going to Read, insert, update, delete records from Zee table.

  • Video Freeze on Version 1.1.  No Radio Function on 1.0

    I've been reading a lot of notice boards and i'm just getting more and more confused!
    I have just bought a 60GB video Ipod and am experiencing the common video freeze problem. Ok so i restore the Ipod back to Version 1.0 and videos dont freeze, problem solved?
    No with my new iPod i also bought the radio remote. Now when i plug it in i have no radio function.
    So am i right in thinking if i want to watch videos i can only do so on version 1.0 and if i want to listen to radio i can only do so on version 1.1????????????????
    Can somebody please help me? I think i'm going mad!!!!

    The common fix for this video freezing problem does indeed seem to be reverting to the earlier version of the software, so yes, you lose the radio function. It also seems to depend on what software you use to convert the video and what model iPod you have (the 30GB seems to be less prone to this than the 60GB). It also doesn't affect everyone's iPod (mine included).
    I think it's a matter of "either/or" until Apple addresses the matter with another updater.

  • Help on Radio Function... please answer

    On itunes under radio, I found a radio station I like but what do I do, or need to get that station to play on my ipod?!?!

    Sorry - no radio function on the iPod. Only iTunes.
    Until that station becomes a Podcast, there is no way to get that (or any) radio station on the iPod.

  • How to launch a function/procedure without suspending the parent process?

    Hi everybody,
    I would like to know if I can define something as follows in PLSQL:
    procedure master
    begin
    call a procedure_child;
    End master;
    I would like that the procedure master does not suspend the execution and wait that the procedure_child finishes in order to resume the executions with the further code.
    Thanks a lot in advanced
    Tomeu

    In the future, please stick to posting in a single forum.
    Re: How to launch a function/procedure without suspending the parent process?

  • Reset the master password through applescript

    I understand that the correct procedure to reset the master password is to delete these two files from the computer:
    /Library/Keychains/FileVaultMaster.cer
    /Library/Keychains/FileVaultMaster.keychain
    The next step is to go into system preferences and click users and groups. The lock has to be unlocked and then the settings button has to be clicked. The text will now say set master password. I can now enter in information in the new popup screen.
    I would like to automate this process through applescript. I need some help on navigation of the system preferences. I have looked at turn Airport on and off code through applescript and don't quite understand how to click the settings and unlock buttons.
    Here is that code:
    tell application "System Preferences"
      activate
    end tell
    tell application "System Events"
      tell process "System Preferences"
        click menu item "Sharing" of menu "View" of menu bar 1
        delay 2
        tell window "Sharing"
          click checkbox 1 of row 11 of table 1 of scroll area 1 of group 1
          delay 1
          if (exists sheet 1) then
            if (exists button "Turn AirPort On" of sheet 1) then
              click button "Turn AirPort On" of sheet 1
              delay 1
            end if
            click button "Start" of sheet 1
          end if
        end tell
      end tell
    end tell

    Resetting or changing a password:
    For Snow Leopard or earlier:  http://support.apple.com/kb/HT1274
    For Lion or later:  http://support.apple.com/kb/HT6022
    This is also useful:
    http://www.macworld.co.uk/ipad-iphone/news/?newsid=3463233&olo=email
    If it's running Mac OS X 10.6.8 or earlier, insert a Mac OS X install DVD, restart with the Option key held down, click on it, and use the Reset Password utility.
    If it's running Mac OS X 10.7 or newer, restart with the Command and R keys held down, open the Terminal, and use the resetpassword command:
    https://discussions.apple.com/docs/DOC-4101
    If it the Keychain password that needs resetting:
    http://support.apple.com/kb/ts1544

  • Trigger .jsx (Javascript) through Applescript

    I have .jsx (javascript) for InDesign CS5. I am trying to automate in a batch mode. I would like to know how to trigger that Javascript through applescript. It would be much appreciate if any one help me on this regard.
    ~John

    I have .jsx (javascript) for InDesign CS5. I am trying to automate in a batch mode. I would like to know how to trigger that Javascript through applescript. It would be much appreciate if any one help me on this regard.
    ~John

  • How to download radio documentaries to ipod through computer.

    how do i download radio documentaries to ipod through computer. when i look at the doc site it has i tunes next to each documentary.thank you.

    I have to admit, both RTÉ and iTunes now make this a long-drawn-out procedure. However...
    evvyseamus wrote:
    the site is www.rte radio1/doconone/. hope this helps
    If you mean http://www.rte.ie/radio1/doconone/ - then presumably you clicked on this:
    which took you to this page: http://www.rte.ie/radio1/podcast/podcast_documentaryonone.xml .
    On that page, at the very bottom, is a section titled How to get this Podcast. Copy the Podcast URL (starting http://) and then in your iTunes, use CTRL+B to display the top menu bar. On that, click on File/Subscribe to Podcast and paste the URL into the box. That should subscribe you to their Podcast, despite being a longer process than it needs to be.
    If you are referring to another site, the procedure is still (basically) the same: find the Podcast's URL and paste it into the iTunes Subscribe to Podcast box. An efficient site will actually open iTunes to the "are you sure you want to subscribe" page. Perhaps RTÉ have a bit to learn.

  • I cannot activate the radio function, no connection is possible, any tipps?

    Hey you, can somebody help me to activate the radio function ?
    i bought a nano but there is no connection possible between nano and headphones
    / radio. after claiming that I got a new one but there is still the same problem.
    what is wrong ? Any idea ?

    The first thing you'll want to do is double check to make sure the headset is plugged all the way in. The white part of the headset should be flush with the body of the Nano.
    Next, reset the iPod by pressing and holding both the Sleep/Wake and Volume Down buttons together long enough for the Apple logo to appear.
    B-rock

  • Personalisation - 'Launch a Function' using variables as parameters

    I am trying to call a function from another form using Built In 'Lanch a function'.
    In Add parameters, If I provide hardcoded values, its working fine. When I try to pass variables such as :GLOBAL.XX_ITEM_ID or ${item.folder.item_id.value} ,
    it errors out
    When I use GLOBAL variable, the error is 'Type does not match definition in form XXX ' I tried using to_char , to_number but no use.
    When I use item.folder.item_id.value it errors out with 'FROM keyword not found'
    I tried putting them in single quotes, pipes etc.
    Can anybody tell me how to pass variabes while launching a function?
    Thanks a lot.

    I just solved it. Used the following syntax
    'G_QUERY_FIND=PO_LINE_LOCATION_ID
    PO_LINE_LOCATION_ID='||${global.xx_po_line_location_id.value}

  • Playing Sirius Satellite Radio music Using Itunes through Airtunes

    Ok.. This is an interesting one. I am a Sirius Radio subscriber. I can listen to a limited list of Sirius Radio stations online with my Mac. Unfortunately that will only play through my computer speakers.
    Itunes has many optional radio stations that play through Airtunes( which I currently own and use). Do any of you know of a way in which I can play my online Sirius Radio broadcasts through Itunes to my Airtunes on my house stereo Receiver?
    I have an Airport Extreme router and Airport express.

    Chris:
    Thanks for the tip. I downloaded the trial version and all seems to work for me. They only allow a 10 minute trial to test it out. I am happy to pay $25 for the working copy.
    That should allow me to extend my Sirius Radio to my home system rather inexpensively. Sirius Radio is a good product, but every radio connection costs more money. I use a boombox with my radio outside, but inside is always challenging to pick up a signal, unless I want to invest more money in an outside antenna( NOT!).
    thanks again.
    larry

  • I have photoshop elements 10 and when I put the 1st disc in it will not load it just launches. I have gone through the step and troubleshooting in the manual but no dices please help.

    I have photoshop elements 10 and when I put the 1st disc in it will not load it just launches. I have gone through the step and troubleshooting in the manual but no dices please help.

    Hi,
    You can download Photoshop Elements 10 from the link below and Install with the serial number,
    http://helpx.adobe.com/photoshop-elements/kb/photoshop-elements-10-11-downloads.html
    Thank you

  • Zen stone plus with speaker 2GB ~~Radio function is very very BAD~~HELP!

    Can Creative correct or bolster the FM radio function~~:smileyindifferent By fireware )
    Or anybody can have some suggestion!!!!!!!
    THis is ugent !!!
    thx a lot~~

    This is Creative's reply to my question:
    "As regards to your enquiry, I would like to inform you that the reason
    of why these 2 frequencies reception are low is because the signal
    strength coming from the transmitting station are weak, especially so
    for FM9.3 as it's often in mono.
    One way to overcome this is to purchase a good and longer earphone as
    the wire itself act as the antenna for FM reception. Allows the full
    cable length run rather than twirl/coil them up.
    Appended is an article on FM RADIO RECEPTION at Mediacorp website: http://www.mediacorpradio.com/ts/reception/"
    I tried again in the open space instead of in my?house but still could not receive many channels. Quite disappointed as I chose?this over Ipod?because of this feature. Let me know if you can get a refund.

  • WHY does the radio function rely on a wired headse...

    I know this is a feature common to many phones but I'm sick and %&&(%&% tired of it, and just don't understand why.
    Picking up my Lumia 900 a couple of days ago it simply annoys me that the radio function cannot operate when connected to a BT headset.
    I had a 'tansistor radio' 40yrs ago that did not require an external antenna.
    The internal antennae of such devices are good for WIFI, BT, 3/4G. Just WHY THE HEY can they not be used for FM radio?

    Hi SuperGumby,
    Thanks for posting and welcome to the forum,
    You can use the radio without wired headset. You can find this and much more information here (specifically here);
    To switch between speaker and headset modes
    While playing a station, press and hold the station number.
    Press Switch to speaker or Switch to headset to switch between the two options.
    Hope this helps,
    Kosh
    Press the 'Accept As Solution' icon if I have solved your problem, click on the Star Icon below if my advice has helped you!

Maybe you are looking for

  • Please Help. Photoshop installation failed half way through

    Initially I had downloaded the photoshop CC2014 trial once, I paid I wanted the CC version because I need the oil paint function which was taken out on the CC2014 version, so what I did is uninstall the CC2014 which was installed and working and proc

  • I'm manually migrating from 10.4 to 10.6 and I have a few synch questions

    hello, I have a more or less corrupt installation of 10.4 (you know, boot issues, permissions going whack every now and then, lots of procrastinating about it) that I'm finally going to wipe completely clean so I can start over with 10.6. but since I

  • Sold-to Party change

    Hello Friends, I recall that we can only change the sold-to party in a sales order if its copied with reference and the copy requirement uses different header customer. If I use a default sold to party for creating an order and before I safe the orde

  • Where is the "show pop-up" menu in iTunes 12?

    Instructions on "Import items from other libraries using home sharing" are clear enough, and also appear to be wrong. There is no "show pop-up menu" option in V 12. This makes it impossible to add music or videos from another library.

  • Failure to burn DVD

    I created a movie in i Movie. It includes stills, video clips, sound effects and music. It plays perfectly in i Movie but during the i DVD process, it seems to crash during the "encoding audio" mode. Help.... and thank you