Getting Automator or AppleScript to start up QuickTime and play a radio sta

I am new to Automator and have never tried AppleScript.
I would like my Mac to start up and play a radio station. I have been successful in getting the link to work in QuickTime or play directly in Safari. However, when I try to use Automator to start QuickTime and play the link, uh, nothing happens. When I save the workflow to the desktop and click on it, it opens up Automator.
I would have expected that running the workflow would open up QuickTime and then load the link and play it.
I am missing something here and getting frustrated with the documentation.
I could use AppleScript, but know nothing about it and have not been able to find a already made AppleScript online.

When I save the workflow to the desktop and click on it, it opens up Automator.
It would appear that you're saving the workflow as a workflow rather than saving it as an application. In Automator's Save dialog, look for the File Format drop-down and select Application instead.
Beyond that, without knowing the stream's URL or the stream's referring web page it would be difficult to say with certainty what the best approach might be. If you could post the URL that would help. A few questions that come to mind: Is the radio station a live streaming AM or FM station? A podcast? What file format is used? Does a .qtl file or some other file get downloaded to your desktop when you click on the "listen live" link from the referring radio station's web page?
For example, when I click on "Click to listen with Quicktime" at kgoam810.com a listenlive.qtl file is downloaded to my desktop. In this case the Automator workflow would be easy to set up, using these two Finder library actions:
1) *Get Specified Finder Items* -- click on the "+" sign, navigate to the listenlive.qtl file and select it.
2) *Open Finder Items* -- set it to open with the default application.
Save the workflow as an application and add to your Login Items.
If no file is downloaded and you have only the stream's URL, you may be able to cobble together a workflow which makes use of a GUI type applescript. I've had success using the following actions:
1) *Get Specified Text* -- from Automator's TextEdit library. Simply type in or paste the URL into the text box.
2) *Copy to Clipboard* -- from Automator's System library.
3) *Run AppleScript* -- from the Automator library. The script shown below has worked for me. Copy the code and paste it into the Run AppleScript box, overwriting what's pre-populated there:
*on run {input, parameters}*
*tell application "QuickTime Player"*
activate
*tell application "System Events"*
*tell process "QuickTime Player"*
*keystroke "u" using command down*
*keystroke "v" using command down*
*delay 1*
*keystroke return*
*end tell*
*end tell*
*end tell*
*return input*
*end run*
Compile the script by clicking on the hammer icon in the Run AppleScript box and save the workflow as an application. Add it to your Login Items.
Note that as a GUI applescript is being used here, you should have "Enable access for assistive devices" checked under System Preferences > Universal Access. Also, under the QuickTime Player's Preferences > Other, make sure that "Show Content Guide automatically" is unchecked.
Your mileage may vary... Good luck!
Andrew99

Similar Messages

  • Using Automator or Applescript to switch between 32 and 64-bit modes

    I'd like to use applescript or automator to create something that would switch logic in and out of 64-bit mode (yes, I'm lazy). I've been fooling around with automator to no avail...anyone have any solutions?
    Thanks in advance.

    As a Launchbar devotee, it's pretty easy for me - to run Logic I hit command-space (to activate Launchbar) then "l" (lower case L) to select Logic and return to run it.
    If I wanted to change mode I do command-space (activate Launchbar) l (to select Logic) then command-I to do a get info, untick the box and go.
    None of this tedious open finder windows and locate the application bundle etc... I do a huge amount via Launchbar, it's about the quickest most efficient way of doing many things.
    Not sure about Applescripts, my guess is it would be quite clunky and slower than the way I do it...

  • Quicktime and Playing Audio CDs - Why Can't I Select the Whole CD to Play?

    I unfortunately agreed to update my Quicktime software when prompted by Apple. Since then, when I try to play audio CDs while working on my Mac, I have to select one song at a time and then select "play" in order to hear it. Now, only 48 hours ago, all I had to do was double click on the audio CD and the whole thing would play with no problem. This is why I am so wary of this so-called "convenient" and "user friendly" update alerts because you never know what the update actually contains and how it is going to change the behavior of your computer!
    Anyone out there in the Mac community know how to fix this problem?

    Anyone out there in the Mac community know how to fix this problem?
    Would assume most people now use iTunes to import/convert audio files for playback/storage on their computer/iPod and/or burning of custom MP3 CDs which hold on the order of 10 times as much music and are compatible with most current generation CD/DVD players.

  • Plug-in for Quicktime to play XDCam?

    I'm working in XDCAM (with the Sony EX3 at 1080p 24fps). I want to deliver my current clients a Quicktime they can play directly from a new Mac PowerBook. I notice they can play a ProRes version without having anything additional installed; but when we tried an XDCAM version, no go.
    Is there an easy way for them to get a plug-in that will allow Quicktime to play the XDCAM movie file format without having FCP installed on their laptop?
    ProRes is great, but it's a rather large file for their laptop.
    All ears,
    Ben

    http://www.calibratedsoftware.com/QXD.asp
    Shane

  • Quicktime not playing at double speed

    When I try to open any mp3 file in QuickTime and play it at 2x speed, it goes silent.  Prior to the iTunes 12.2 update/Yosemite Recovery Update 1.0/OS X 10.10.3 update, this wasn't an issue.
    QuickTime is currently running on ver 10.4
    I'm running on a Macbook Air with a 1.4 Ghz processor intel core i5 with 4 GB 1600 MHz DDR3 with 50 GB of memory left.
    Any help.

    The music manager of Nokia have some hiccups need to be ironed out yet, use windows music player to rip & convert the music to mp3 or wma, then transfer it by use of file manager of pcsuite to the appropriate phone directory(cut & paste).
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • Problem to get start with QuickTime in a new application.

    Im new in using QuickTime7.1 SDK.I installed QuickTime and now want to start using the components in my C++ application.I would like to know how quicktime QuickTime ActiveX control should be included in a new C++ project and to see whether its installed successfully in my system.Im working with Dev-C++ IDE in Windows XP.I will be greatful if anybody can help me with the same issue.
    Thanking you in advance,
    sans
      Windows XP  

    Hello.
    Thank for your answer, but I have already implemented the BADI and I have the new svubscreen in my own tab strip. The problem is: I need to get the values of  other tab strip "SERIALS" and it is a table control.
    best regards,
    Alvaro.

  • Automator or Applescript using png files with alpha channel

    I have hundred of png files with alpha channel.
    I want to suppress alpha channel.
    How can i do it using Automator or Applescript ?
    Thank you very much.

    You can use the free command line image processing tool ImageMagick in your Applescripts or Automator workflows, as well as from a Terminal shell.
    You can download ImageMagick from http://www.imagemagick.org, but Cactuslab has simplified installation by putting together an installer package. It’s available at  http://cactuslab.com/imagemagick/. Download the package and double-click on it. Follow the instructions to install. It will install ImageMagick into /opt/ImageMagick and add it to your $PATH by creating a file in /etc/paths.d/. Restart your computer for the changes to take effect.
    The two ImageMagick commands we’re concerned with are “convert” and “mogrify”. Convert is more efficient for multiple and piped operations on the same image file, and mogrify is more efficient for batch processing. Generally speaking, convert will output a file separate from the input file. Unless a path is specified, mogrify will overwrite the input file with the output file. An important distinction.
    You can perform various operations on the alpha channel using arguments after either the convert or mogrify command. Two of the available arguments are:
    -alpha off - Disables the image's transparency channel. Does not delete or change the existing data, just turns off the use of that data.
    -alpha remove - Composite the image over the background color.
    Also of use are the -flatten and -background options:
    -flatten - overlay all the image layers into a final image and may be used to underlay an opaque color to remove transparency from an image.
    -background - sets the background color.
    Start off using the convert command with a single image to see the effect and adjust to your liking. Once you’ve achieved the desired outcome, then use the mogrify command to batch process the chosen images.
    Before getting into how to use Automator or Applescript in your workflow, use Terminal and the command line to see the effect on a single image. Copy one image to your ~/Desktop. In Terminal change the directory to ~/Desktop by typing the following command and pressing the Enter key:
    cd ~/Desktop
    Then choose the option you are looking for, -alpha remove for instance, type the following command and press the Enter key:
    convert input-photo.png -alpha remove output-photo.png
    You can check the alpha channel (transparency) and background in the Preview app, go View > Show Image Background from the menu bar.
    Once you’re ready to batch proces, place all the photos you want to convert with the same command into one folder. Copy the folder to your ~/Desktop. Let’s assume you’ve labeled the folder “InPhotos”. It’s prudent to manipulate copies in case something goes amiss. In that event you can copy the folder with the originals again and start over. Create a new empty folder on your ~/Desktop and call it “OutPhotos”. Let’s also assume your home directory is called “Me”. The following command will process the photos from the InPhotos folder and put them in the OutPhotos folder:
    mogrify -alpha remove -path /Users/me/Desktop/OutPhotos/ /Users/me/Desktop/InPhotos/*png
    According to Apple Technical Note TN2065:
    "when you use just a command name instead of a complete path, the shell uses a list of directories (known as your PATH) to try and find the complete path to the command. For security and portability reasons, do shell script ignores the configuration files that an interactive shell would read"
    So, you need to use the full path to to ImageMagick commands, unlike in the shell where you can just use the command name.
    To batch process using Automator, use the “Run Shell Script” action (note: retain the single space at the beginning of the last line):
    /opt/ImageMagick/bin/mogrify \
    -alpha remove \
    -path /Users/Me/Desktop/OutPhotos/ \
    /Users/Me/Desktop/InPhotos/*png
    To batch process using Script Editor (Applescript), use the “do shell script” command:
    do shell script "/opt/ImageMagick/bin/mogrify -alpha remove -path /Users/pd/Desktop/OutPhotos/ /Users/pd/Desktop/InPhotos/*png"
    Further info on ImageMagick:
    http://www.imagemagick.org/script/command-line-options.php#alpha
    http://www.imagemagick.org/Usage/masking/#remove
    http://www.imagemagick.org/index.php
    http://www.imagemagick.org/script/command-line-tools.php
    http://www.imagemagick.org/script/command-line-options.php
    Examples:
    The original PNG image:
    -alpha off:
    -alpha remove:
    -background black -flatten:
    -background blue -flatten:
    -channel alpha -evaluate Divide 2:
    -channel alpha -evaluate Divide 2 -background black -flatten:

  • Applescript with quicktime and excel2004

    I would appreciate any help on the following.
    I have a lot of quicktime videos I need to look at. Each movie contains many subjects doing diffferent things. Subject A say begins to talk, and I can get the time code of this point by looking at the quicktime time info window.
    When this subject finishes, I can do the same. And, I can get the time this subjectA was talking. The subject A might speak at different times in the movie, and I need to record all this start-end times, and the differences each time, and get a cumulative sum.
    I know to get the time stamp using applescript from a currently open movie.
    tell application "QuickTime Player"
    activate
    try
    --I check if i have qt pro -not shown here
    set this_movie to the name of movie 1
    set this_time to the current time of movie 1
    set movie_scale to the time scale of movie 1
    set this_timecode to my time2timecode(this_time, movie_scale)
    display dialog "Current time of “" & this_movie & "”:" & ¬
    return & return & this_timecode buttons {"Clipboard", "OK"} default button 2
    if the button returned of the result is "Clipboard" then
    set the clipboard to this_timecode
    display dialog "The timecode is now on the clipboard." buttons {"•"} default button 1 giving up after 2
    end if
    end try
    end tell
    Now, the time stamp is in the clipboard, How can I take it into columns in Excel2004 -- using applescript.
    subjA startTime endTime diff
    subjA startTime endTime diff
    subjB startTime endTime diff
    subjA startTime endTime diff
    subjC startTime endTime diff
    subjA startTime endTime diff
    Any help is appreciated. Right now, I want to do this for a ppc running osx tiger and using excel for office 2004, and quicktime 7.x pro.
    Will the script be differrent if this were performed on an intel-mac?
    Rand on PowerMac PPC G5
    PowerMac PPC G5- excel 2004- qtpro7 -- Tiger   Mac OS X (10.4.7)  

    tell application "QuickTime Player"
    activate -- Launch and / or bring forth 'QuickTime'.
    set tList to {} -- List to contain obtained date.
    tell movie 1 to copy name to end of tList -- Place name of current movie into tList.
    repeat
    set {tFlag, tResult} to {0, display dialog "(Start Time) ... Subject letter: " default answer "A" buttons {"OK"} default button 1}
    -- Place Subject Name and scaled Start Time into tList.
    tell movie 1 to set {tSubject, movie_Name, start_time, time_scale} to {text returned of tResult, name, current time, time scale}
    copy {tSubject, start_time / time_scale} to {end of tList, end of tList}
    if ((button returned of (display dialog "End time of Subject: " & tSubject buttons {"Completed", "Continue..."} default button 2)) is "Completed") then set tFlag to 1
    tell movie 1 to set end_time to current time
    copy (end_time / time_scale) to end of tList -- Place scaled End Time into tList.
    if (tFlag = 1) then exit repeat -- Exit infinite loop when 'Completed' button is selected.
    end repeat
    tell application "Microsoft Excel"
    activate -- Launch and / or bring forth 'Excel'.
    if (not (document 1 exists)) then make new document -- Create a new document, if needed.
    -- Add header information to Worksheet.
    set (value of cell 1 of row 1) to "Movie Title: "
    set Column_Titles to {"Subject", "Start Time", "End Time", "Difference"}
    repeat with i from 1 to (count Column_Titles)
    set (value of cell i of row 3) to (item i of Column_Titles)
    end repeat
    -- Add contents of tList to the worksheet.
    set tInc to 1
    repeat with i from 1 to (((count tList) - 1) / 3)
    repeat with j from 1 to 3
    set tInc to (tInc + 1)
    set (value of cell j of row (i + 4)) to (item tInc of tList)
    end repeat
    set (value of cell (j + 1) of row (i + 4)) to ((item tInc of tList) - (item (tInc - 1) of tList))
    end repeat
    end tell
    end tell
      Mac OS X (10.4.4)  

  • Stopping Automator "Run Applescript" if file not found.

    Hi all,
    I'm creating a folder action that, when a file is added to the folder, will search the folder to see if the file is of a certain type (by the extension) and then run an Applescript that will open the file in the appropriate program. The problem is that not all files that go into the folder are of the correct type. Is there any way to tell Automator or Applescript to stop if no file is found (essentially "input" should be empty)?
    Thanks,
    Stuart

    Thank you for a helpful answer. I recently wrote an Automator application that opens several web pages in tabs and checks my email. It is set to run at login. Using a modification of your code and a line I pick up elsewhere I was able to make the Automator application end when I press command+. keys.
    Perhaps you can answer a different question for me. I am new to Automator but catching on quickly. I am not very good at AppleScript however. I have three automator-based workflows saved as applications. One needs to run every day and then trigger one of the other two depending upon the day or date.
    The branching seems to work OK but once the appropriate workflow starts to run I get an error. I think it is -1708. Any help you can provide would be appreciated.
    2 Gig G5   Mac OS X (10.4.7)  

  • Create Automator workflow/AppleScript to automatically move files within NAS

    Running iMac / Macbook Air (OS 10.9.5), having the Macs connected wireless to the same network as a Seagate Central (NAS). On the Seagate Central and the iMac I have specified a couple of folders which are bidirectional synced via "Sync folders pro", e.g. pictures/movies folders. As a family, we have several iPhones (4S and 5S) with dedicated folders on the Seagate Central / iMac. Having the Seagate Media app on the iPhones, we are able to upload (and thereby free iPhone memory) pictures/movies directly onto the Seagate Central (pictures/movies which then are synced back onto the iMac). However, when uploading pictures/movies from the iPhone to the Seagate central (via Seagate Media app), it is not possible to define a target directory, and the pictures are therefore uploaded to a dedicated directory. I therefore search for some workflow/script to automatically (when new pictures/movies are uploaded, or at a daily basis);
    - Search for pictures/movies within a specific NAS folder
    - Move the pictures/movies to another specific NAS folder
    - Delete all other files/folders within the NAS folder being searched
    New to Automator / scripting, so I hope you bear with me even if the questions are dumb.
    Is it possible to make the NAS recognize a workflow/script without starting the iMac and/or MBA?

    Ok, so I made it a bit further, now having the following Automator Workflow (iCal)
    1. Get requested clients (check for ignore input from this action)
    - afp://192.168.1.86/Public
    2. Connect to client
    - I end up with a mounted disc (Public folder). Note that I end up at the same folder even if using afp://192.168.1.86/Public/iPhone/Photos in step 1.
    3. Get specified Finder items (check for ignore input from this action - to avoid having the Public folder itself following the workflow)
    - Choose the subfolder Public/iPhone/Photos
    4. Get folder content
    5. Filter Finder items
    - Did not get any results by using arguments as "kind is picture" and/or "kind is movie"
    - Ended up using arguments as "name contains jpg", "name contains mov" etc
    6. Move Finder items
    - Destination folder: Public/Pictures/iPhone
    - I now successfully managed to transfer the pictures and movies from one NAS folder to another
    *** I now want to continue the workflow to delete all other Folders/Files on Public/iPhone/Photos ***
    7. Get specified Finder items (check for ignore input from this action - to have no existing input for the remaining workflow)
    - Choose the subfolder Public/iPhone/Photos
    8. Get folder content
    - Results no showing a folder and a file
    9. Move Finder items to trash
    However, I´m encountering a couple of problems with this workflow;
    Note1: If there are no pictures/movies to move (no output from #5 going into #6), the workflow will stop. Any suggestions on how to skip step #6 and go to #7 if there are no pictures/movies to move? Applescript within Automator? Setting up the workflow as iCal (regular basis), so would be nice if the workflow just completes without errors (i.e. still goes on with deleting other files on the folder, even if there are no pictures/movies to move).
    Note2: Step #9 result in a error "Finder could not move the specified items to trash". Has this something to do with a folder and some other file being attempted deleted from a NAS folder? Any suggestions for how to cope with this problem?

  • I just got a new computer with Windows 7 and all my songs were transferred to my new computer along with itunes.  But I can't get it to work.  I also tried downloading Quicktime and couldn't get it to download.

    I just bought a new computer and had files transferred along with itunes to the new computer.  I can't get it to work.  It doesn't recognize the extensions for itunes.  I also tried downloading Quicktime and couldn't get it to download.

    iOS: Device not recognized in iTunes for Windows
    I would start with:
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7

  • Is there a way to get Automator to select invisible files?

    I need a way to get Automator to be able to select invisible files. Does anybody know a workaround?
    Shift-Command-Period doesn't do anything (except make a beep).

    The regular Automator actions typically use the current Finder settings, so (depending on your workflow) you can temporarily set the Finder to show all files (including invisibles) and reset it when you are done, or you can use a *Run AppleScript* action to put up a file choice dialog that includes invisible items.

  • How can I get Automator to create a workflow for combining .jpgs into pdf?

    I have a large folder with many subfolders, and each subfolder has many subfolders. Those last mentioned subfolders have many .jpgs inside which I want to make them into a pdf. The question is, how can I get automator to do this for me? I tried using the help but it only made things even more confusing, it didn't help at all. I also have an app for creating pdfs out of combining pngs, jpgs, gifs, etc. (Combine PDF).
    The task of making hundreds of pdfs out of so many jpgs that I have, is there somehow a way I can get automator to do this for me? So far I haven't even found an example with understandable screenshots so that I can get into the correct way of making a workflow do what it is supposed to do correctly.
    Please help...

    Thank you for your reply, the workflow is opened fine, however I'm not sure how to then get this scripted workflow to do what I want to do? I'm a complete n00b when it comes to Automator, is there perhaps a tutorial for idiots that is known where I could read about starting out with Automator to understand it better?
    Thank you

  • How do I get automator scripts into iTunes? Very frustrated.

    This is one of those questions that probably has a very simple answer unless you haven't worked with Automator or applescripts.
    I found Automator, created a script for iTunes to change settings for audiobooks that I import from CD so that it remembers it's place in a "song", makes it so that it doesn't show up in shuffle lists, and doesn't have a gap between songs. Yippee for me.
    I click on File, Save, name the file and save it and ... it doesn't show up under iTunes. It only took me 45 minutes to get it so that the scroll icon shows up under iTunes (I'm so confused now that I don't even know which thing I did caused that to happen) but my script I created doesn't show up.
    I did find one place that said to place the file in (myname\library\scripts\programname) So I went to my home folder, find the library folder, found the scripts folder, and found only one application under there (Safari) but no iTunes. I created a folder called iTunes and saved my script there but ... it doesn't show up under iTunes.
    I did try quitting iTunes and opening it back up and ... it still isn't there.
    Is this even the right place to ask this question?

    It seems at this point the Script menu in iTunes doesn't recognize Automator files. A quick and dirty fix is to save the workflow as an application and then make an AppleScript that says:
    tell application "NameofApp" to launch
    save that script as a script and put it in the appropriate folder (/Users/username/Library/iTunes/Scripts). That script should show up in iTunes and running that will run your application which should do what you want.
    Hope this helps.

  • I backed up my movies and rebuild my computer, and after making sure i'm using the latest version of itunes and quicktime and and making sure i still had spare computer authorizations, i still get error 23132.  Please help.

    I backed up my movies and rebuild my computer, and after making sure i'm using the latest version of itunes and quicktime and and making sure i still had spare computer authorizations, i still get error 23132.  Please help.

    I had this exact issue.  Spent over an hour on the phone with apple support, they couldn't resolve.  Here is what I ended up doing, that worked.
    1.  Turned iTunes match off on all my iOS devices
    2.  Deleted the offending playlists from the iOS device they originated on
    3.  Started iTunes, let it run (literally) for an hour before it became responsive.  First thing I did, before clicking anywere else was disable iTunes match.  If I clicked anywhere, it would clock for another hour.
    4.  Let iTunes run overnight, by morning it had cleaned out the repeating play lists.  This got my Mac/iTunes back to an operable state.
    5.  Restore iPhones from backup in iTunes.
    What was causing my issue was a single playlist that was created on an iPhone, then suddenly showed up with several thousand duplicates on my other iPhone.  The culprit playlist did not, for some reason, duplicate itself on my two iPads.  Apple support seemed to think it was because the problem iPhone tried to sync the playlist to iCloud over and over again unsuccessfully, then it finally went through and populated the thousands of blank/failed playlists which then tried to propigate to iTunes and my other iOS devices.  Seems like a reasonable theory.
    I have not yet re-enabled iTunes match.  So, no idea what will happen if I decide to go back down that rabbit hole.

Maybe you are looking for

  • Sale Order Invoicing problem

    Dear All, Please help me in this i am getting when i am trying to post the Sales invoice after doing Post Good issue. Request all experts to help me in this. waiting for reply in anticipation. Details of Error given below Delivered/invoiced quantitie

  • Problem with photoshop cs 6 using tools

    When im using clone tool and press [ and ] key to zoom in and out, the zoom key suddenly stops working. What seems to be the problem?

  • File access to /res folder before decompression

    Hi, anyone please assist on how i would access a compressed text file in the /res folder before I can decompress it. I also need to know if its possible to create a file since the decompression algorithm creates a new decompressed file. The following

  • Vertical axis scaling problem with XYZ bar/line chart

    Post Author: satwar CA Forum: WebIntelligence Reporting Is there a trick to making the scaling on the Z-axis equal to the Y-axis. I don't want to specify the scaling on either axis because I am generating report with filtered "dimensons" in order to

  • Deleting photos/formatting SD card after use in Canon T1i

    So once my Canon Rebel T1i formats my SD card in it's default state with two directories (DCIM/Canon) I have no permissions on the card other than "read only." This came up out of no where and now I can't delete images off of it in iPhoto (or the com