Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Doesn't seem to support Standard Input from Pipe and parameters?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Doesn't seem to support Standard Input from Pipe and parameters?
Authored by: josephaw on May 01, '02 03:59:24PM

mpg123 does work well at the command line on my G4 400.
But I wanted to create a drag and drop application for my dock. Figured I use applescript but I found that applescript had ':' in the path of the files selected.
So I added a sed editor to the data coming from applescript to globally strip the data coming from applescript from ':' to '/' but then I found that I could not take the data from sed and pipe it to mpg123.
Tried placing the sed command after the mpg123 command withing single quotes to get it to run the sed first, but mpg123 seems to be ignoring the results of the sed running.
Also noticed that applescript does not show the /Volumes/ in the path so I would still need to test to see if the file exists in local and Volume locations before giving up on the file dropped.
Bottom line. I guess I'll have to dabble in the Project builder to make a C program for the dock that can parse the data coming from the dropping of mp3's to it.
Or maybe someone out there has already done this and can save me the work.
Also, have you noticed that none of the command line parameters seem to work, but that may be documented already.
I have been waiting patiently for SoundApp to be ported because I want a very simple mp3 player for the dock.
Thanks, JosephAW



[ Reply to This | # ]
Doesn't seem to support Standard Input from Pipe and parameters?
Authored by: sjonke on May 01, '02 04:46:54PM
It may or may not fit the bill, but take a look at Mu which is an Aqua GUI for mpg123. Seems not too bad in my so far very brief tryout, but I can't figure out how to add a URL (stream) to the playlist. It doesn't look like it's possible.

[ Reply to This | # ]
Applescript shell script 101
Authored by: sjonke on May 01, '02 05:39:26PM

Well, precisely one lesson. You want to use "POSIX path". For example:

set someFile to choose file
get POSIX path of someFile

That will return the familiar unix style path to a file, folder or whatever. Note that you don't have to enter the capitalization - script editor will do that for you when you hit Enter, like it or not. :)



[ Reply to This | # ]