Old 24th November 2004, 12:58   #1
jplank
Junior Member
 
Join Date: Nov 2003
Posts: 38
tcl winamp

I'm an beginner in Tcl.
But how can is set that on 1 oClock winamp must be pauze, and at 2 oClock winamp must be play.

Please help me.
jplank is offline   Reply With Quote
Old 24th November 2004, 23:30   #2
DJ Egg
Techorator
Winamp & Shoutcast Team
 
Join Date: Jun 2000
Posts: 35,824
What's Tcl anyway? You mean this?
http://tcl.sourceforge.net/
http://www.tcl.tk/
DJ Egg is offline   Reply With Quote
Old 25th November 2004, 01:06   #3
maynardkrebs
Junior Member
 
Join Date: Nov 2004
Posts: 19
Quote:
Originally posted by DJ Egg
What's Tcl anyway? You mean this?
http://tcl.sourceforge.net/
http://www.tcl.tk/
That's the one... I've used it for sw app integration under unix/windows and it's a very nice language to work in. Also has a gui dev environment (tk). Not sure what DJ Egg is askin for though...
maynardkrebs is offline   Reply With Quote
Old 25th November 2004, 08:17   #4
will
Nullsoft Newbie (Moderator)
 
will's Avatar
 
Join Date: Mar 2001
Location: Sheffield, England
Posts: 5,569
ack. TCL is the most disgusting language in existance.
I'd rather program in raw machine code rather than tcl.

DO NOT PM ME WITH TECH SUPPORT QUESTIONS
will is offline   Reply With Quote
Old 25th November 2004, 11:05   #5
Lord Darius
Senior Member
 
Lord Darius's Avatar
 
Join Date: Jul 2003
Posts: 248
If you want to script winamp, i'd recommand using shaneh's ActiveWinamp plugin, see http://forums.winamp.com/showthread....hreadid=191641

and yes... I agree with Will, Tcl = yuk

Last edited by Lord Darius; 25th November 2004 at 12:13.
Lord Darius is offline   Reply With Quote
Old 25th November 2004, 11:56   #6
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
Ordinarily you would have to find some way of doing SendMessage calls to Winamp, not sure if TCL will let you do that, I assume so. Otherwise theres pleny of small apps which will send these messages for you, just run 'play.exe', 'stop.exe' as necessary using normal system calls appropriate for your language.

If you are trying to do anything more complicated from an external application, it gets quite tricky. Especially if you want to use high level languages. ActiveWinamp or WinampCOM would let you use Winamp externally from these environments ok.
shaneh is offline   Reply With Quote
Old 11th July 2006, 03:34   #7
Nightbreed
Junior Member
 
Nightbreed's Avatar
 
Join Date: Jul 2006
Location: Philadelphia, PA
Posts: 6
Hi.. I'm new to the forum. I'm a mod over at lostinthebox.com (Blackbox for windows project) I came across this thread doing a google search on tcl and activewinamp scripting.
I have some info here, on the subject:http://www.lostinthebox.com/viewtopic.php?t=1644

I currently use a tcl library called dll.dll which gives the sendmessage and such for controlling applications via tcl.

I use the ActiveWinamp control with tcom for tcl which works just fine. I have a winamp control that uses most of the features from both tcom and the dll caller. You can find more info from the link above and through out that forum.

I'm still having difficulties with converting some of the examples shown in the scripting forum over to tcl (mainly the ATFString stuff) but if anyone else would like to do more tcl stuff with this I'd be happy to help out.
Nightbreed is offline   Reply With Quote
Old 11th July 2006, 03:37   #8
Nightbreed
Junior Member
 
Nightbreed's Avatar
 
Join Date: Jul 2006
Location: Philadelphia, PA
Posts: 6
Sorry, forgot to post the link on dll.dll (aka, another dll loader). Here's the Wiki page on the subject: http://wiki.tcl.tk/12264

If anyone wants to see examples of how to grab winamps window or any other window via tcl, let me know.
Nightbreed is offline   Reply With Quote
Old 11th July 2006, 05:07   #9
Nightbreed
Junior Member
 
Nightbreed's Avatar
 
Join Date: Jul 2006
Location: Philadelphia, PA
Posts: 6
I figure I'd post a few examples of scripting winamp with tcl using the methods above and AcitiveWinamp.

One example of grabbing winamp's window with the dll caller is:

code:

package require dll
package require tcom

::dll::load user32 -> u
::u::cmd "int FindWindowA(char *, char *)"
::u::cmd "int SendMessageA(int, int, int, int)"

global u

set winamp [::u::FindWindowA "Winamp v1.x" "null"]



For ActiveWinamp I use this:

code:

set WinAmp [::tcom::ref getactiveobject "ActiveWinamp.Application"]
set fs [::tcom::ref createobject "Scripting.FileSystemObject"]



Note: you can access any COM object with tcom...


Now,to test your variables.. once you have your ActiveWinamp defined you can run whatever command from there.
For example:
code:

$WinAmp Play
$WinAmp Skip
etc.....
Accessing playlist functions is as easy as:
set playlist [$WinAmp Playlist]



Hope this helps a few folks with TCL scripting.

Edit: Forgot to show how to send a message to winamp via the dll caller...

This method is handled like this:
code:

set winamp [::u::FindWindowA "Winamp v1.x" "null"]
set WM_COMMAND [expr {"0x111"}]
set WA_NOTHING 0

::u::cmd "int SendMessageA(int, int, int, int)"

::u::SendMessageA $winamp $WM_COMMAND 40044 $WA_NOTHING

# This sends the Previous message to winamp via dll caller

Nightbreed is offline   Reply With Quote
Old 11th July 2006, 15:48   #10
Nightbreed
Junior Member
 
Nightbreed's Avatar
 
Join Date: Jul 2006
Location: Philadelphia, PA
Posts: 6
Here is a couple of screenshots of ActiveWinamp using full tcl scripting

http://www.lostinthebox.com/viewtopic.php?p=11592#11592
Nightbreed is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

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