Old 25th January 2012, 00:23   #1
Whytefang
Junior Member
 
Join Date: Jan 2012
Posts: 1
CLAmp.exe help?

So I'm looking to write some Java code to control my winamp through what my users want. So far, I have everything working. However, CLAmp.exe (what I'm using to control winamp) isn't cooperating.

I'm calling this line:

code:
process = new ProcessBuilder("C:\\Users\\awef\\workspace\\MusicBot\\CLAmp.exe", "/PLSET " + mostVotes2).start();


To open CLAmp and call the /PLSET XX function. However, it tells me it's an unknown option! If I remove the +mostVotes2, causing it to use just "/PLSET", it tells me that it requires and argument.

I've tried using CLAmp v1.15, 1.13, and 1.11. Does anyone have any suggestions? D:
Whytefang is offline   Reply With Quote
Old 13th June 2014, 00:10   #2
RichPasco
Member
 
RichPasco's Avatar
 
Join Date: Jan 2003
Location: San Jose, Calif & Land O Lakes FL
Posts: 63
Hi,

I have used CLAMP 1.15 with success for some time now, but recently,
when I invoke "clamp /start" I get:

Unable to start "C:\Program Files (x86)\Winamp\Un" (error 2)

Of course the correct location for Winamp.exe is:

C:\Program Files (x86)\Winamp\winamp.exe

I am using Winamp 5.666 under Windows 7 Pro 64-bit.

How can I get "clamp /start" to start winamp.exe instead of the non-existent "Un"?

- Rich
RichPasco is offline   Reply With Quote
Old 13th June 2014, 00:18   #3
DrO
 
Join Date: Sep 2003
Posts: 27,873
technically there shouldn't be any reason that i'm aware off for it not to be able to run Winamp, though due to the age of it, it could just be that CLAMP doesn't work well anymore for whatever reason.

though i would suggest you consider looking at the command-line options Winamp natively supports (using winamp.exe /?) and see if what you're trying to do with CLAMP is able to be done with Winamp natively. and if it cannot, if you can say / show what you're using with CLAMP, there's a fair chance it could be added natively to Winamp.
DrO is offline   Reply With Quote
Old 13th June 2014, 00:52   #4
RichPasco
Member
 
RichPasco's Avatar
 
Join Date: Jan 2003
Location: San Jose, Calif & Land O Lakes FL
Posts: 63
Thank you--it works!

Thanks, DrO. Until I read your post, I was unaware that Winamp had added native command-line options for everything I used to need CLAMP for, since I first wrote my script using CLAMP. I have now re-written it to call Winamp natively instead of via CLAMP, and it seems to work perfectly. I am very happy.

- Rich

Last edited by RichPasco; 13th June 2014 at 01:06. Reason: Update
RichPasco is offline   Reply With Quote
Old 13th June 2014, 01:14   #5
DrO
 
Join Date: Sep 2003
Posts: 27,873
rightio, that's good to know it's working ok with direct usage instead of via CLAMP (as what was implemented was based off the WaCommand syntax and a few other tools) so it's good to see someone able to remove the need for an external program to do things (as the increased command-line support was added when i didn't think there was going to be any more newer Winamp releases and thought it'd be helpful for some possible 3rd party options which would still be able to be done with what was going to be the 'final' version).
DrO is offline   Reply With Quote
Old 13th June 2014, 01:20   #6
RichPasco
Member
 
RichPasco's Avatar
 
Join Date: Jan 2003
Location: San Jose, Calif & Land O Lakes FL
Posts: 63
I just noticed something strange. It's not a show-stopper, as I can work around it, but I am curious.

If Winamp is not already running when I invoke it from a command shell window with simply the word "winamp" on a line by itself, then command returns immediately to the command line while Winamp loads. However, if I invoke it from a script (.BAT file) with the word "winamp" on a line by itself, then the .BAT file stops executing and waits for me to close Winamp before going on to the next line. This is under Windows 7 Pro 64-bit. The solution seems to be to use the Windows command "start" like this:
code:
start "title" winamp.exe
RichPasco is offline   Reply With Quote
Old 13th June 2014, 01:40   #7
DrO
 
Join Date: Sep 2003
Posts: 27,873
that's to be expected as the simple bat file action will wait for the Winamp process to end before it continues which is not going to happen unless you close Winamp. so using 'start' makes sense (and is essentially the same as what CLAMP, etc would be done when running the Winamp process).
DrO is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump