Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8155769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:45:38+00:00 2026-06-06T16:45:38+00:00

I want to use iTunes to render a http mp3 stream on MacOSX. I

  • 0

I want to use iTunes to render a http mp3 stream on MacOSX. I understand the best way to remote control iTunes programmatically is AppleScript and I already can start iTunes, but:

  1. what is the correct syntax to open a stream from a URL?
  2. is it possible to keep iTunes invisible / hidden when running it via apple script? It always opens the GUI..
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T16:45:39+00:00Added an answer on June 6, 2026 at 4:45 pm

    Sending iTunes a command while it’s not running will cause it to start up and display its default GUI; there’s no easy way around that.

    But if you want to force iTunes to hide, rather than keep it hidden if it wasn’t already visible, you can do that:

    tell application "iTunes"
      open location "your_url_here"
      play
      set visible of every window to false
    end tell
    

    Or, if you only want to hide iTunes if your script launched it, you can do something like this:

    tell application "System Events"
      set iTunesWasRunning to count of (processes whose name is "iTunes")
    end tell
    tell application "iTunes"
      open location "your_url_here"
      play
      if iTunesWasRunning is 0 then set visible of every window to false
    end tell
    

    Of course there are some edge cases it doesn’t handle (e.g., if iTunes was running, but the browser window was minimized, you will cause it to unminimize, and won’t re-minimize it); look through the iTunes and System Events dictionaries and experiment with each edge case you care about. Also, there’s a small race condition (if the user, or another script, happens to launch it after your check…), but there’s not much you can do about that.

    You don’t actually need the “play” except in certain uncommon cases (e.g., iTunes is already paused on a stream), but it doesn’t hurt.

    Finally, by default, this will add “your_url_here” to a playlist called “Internet Songs” each time you run it, even if it’s already there, creating the playlist if necessary. Hopefully you don’t mind that; if you do, there are more tricks to learn.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to access iTunes user preferences such as playlists programmatically. I use to
I want to use bit.ly to track my itunes affiliate links. I get affiliate
I want use this 1 for using Bar code or QR code scanner. I
I want use BYTE_ORDER macro in my Xcode project but i can't because i
I want use javascript setInterval function to achieve a box rotate animate effect, I
I want use a single php file to handle all of my voting requests.
I want use groovy findAll with my param to filtering closure filterClosure = {
i want use some data from a website with web service. i have a
I want use JQuery mobile for the front-end of my mobile application, but I
I want use jQuery in my project. I know the javascript_include_tag calls the jQuery

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.