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

  • SEARCH
  • Home
  • 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 8947337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:44:00+00:00 2026-06-15T12:44:00+00:00

I am controlling iTunes via AppleScript and I am playing streams from an HTTP

  • 0

I am controlling iTunes via AppleScript and I am playing streams from an HTTP server. The code I’m using looks like this:

tell application "iTunes"
  open location "your_url_here"
  play
end tell

It works fine, but I would like to avoid those URLs to show up in the iTunes library or any playlist afterwards. Is there a trick to achieve that?

  • 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-15T12:44:01+00:00Added an answer on June 15, 2026 at 12:44 pm

    Have you considered using QuickTimePlayer to play the stream instead?

    tell application "QuickTime Player"
        open URL "http://www.a-1radio.com/listen.pls"
    end tell
    

    It should open all the iTunes formats, it comes as a default on OsX, it is more “minimal”, won’t save tracks.

    (I know you specified you want to use iTunes so this might not be a solution, but being preinstalled software it was worth a try)

    EDIT To have it hidden, this seems to work:

    tell application "QuickTime Player"
        -- don't use launch or activate
        -- on my mac with launch I see a flicker of the window
        set numberOfWindows to (count windows)
        repeat with i from 1 to numberOfWindows
            close front window
        end repeat
    end tell
    
    -- may add some delay here if it still flickers the window
        -- delay 1
    
    tell application "QuickTime Player"
        open URL "http://www.a-1radio.com/listen.pls"
        set visible of every window to false
    end tell
    
    tell application "System Events"
        set visible of process "QuickTime Player" to false
    end tell
    
    -- must be called after the open URL command or won't work (no idea why)
    

    To close the stream either quit or close windows (just close if you plan to reopen):

    tell application "QuickTime Player"
    
        -- here you can either:
    
        -- close all (will leave app open and hidden)
        set numberOfWindows to (count windows)
        repeat with i from 1 to numberOfWindows
            close front window
        end repeat
    
        -- or:
    
        quit -- or just quit (will close app so will need to hide again next time)
    end tell
    

    If you hide it before opening the url, it doesn’t work (no idea why). Of course the window, even if invisible, is still open so if someone clicks on the dock icon it will show all the open windows.
    If you don’t want to stop previous streams remove the first repeat -- end repeat part at the top, but leave the set numberOfWindows to (count windows) that is useless but activates the app without needing a activate/launch command

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

Sidebar

Related Questions

I am controlling iTunes (on OSX) via AppleScript and would like to know when
I am controlling iTunes via AppleScript and am adding URLs to the main library
I am making an application that involves controlling Safari from Applescript. Is there a
I'm controlling a creaky old FORTRAN simulator from a VB.NET GUI, using redirected I/O
I get the warning controlling expression is constant on assert statement like this: assert(...
I've had some luck controlling processing.js sketches using html form elements and would like
My app is controlling iTunes via scripting bridge. Other apps are able to choose
I like version controlling my code. It would be a pain to copy every
I request a JSON response from a home controlling device: NSData* responseData = [NSData
I'm controlling my self-designed USB device using SCSI interface with C by opening a

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.