TrillKey, the Trillian Event Extender v0.725.13 :)

Performs operations in Trillian.  (Useful for making shortcut keys.)
NOTE: This has only been tested in Trillian v0.70 - 0.725.  Since Cerulean
Studios has not released an official API yet, this isn't guaranteed to
work with any other versions.  It will NOT work with older versions.
Please e-mail me if you try it in another version.

There are several ways you can use TrillKey.  1) set up an advanced event in 
Trillian.  2) create a shortcut to TrillKey with whatever arguments you want in 
the target / command line.  3) run it from the run dialog in windows.

To set up an event in Trillian:
preferences --> events --> advanced --> new --> hotkey, execute program
   program: TrillKey of course :)
   parameters: see below

BTW: For those who don't know, a trillkey is a real device found on 
certain wind instruments.  I used to want to be a clarinet/sax player :)

Use:    TRILLKEY <option> [<modifier>]

OPTIONS (most names can be shortened)
   preferences      Preferences
   awayedit         Edit Away Messages
   away+            Add Away Message
**   away             Set globally away  ** disabled
**   back             Set globally back  ** disabled
   connect          Connection manager
   reconnect        Reconnect globally
   disconnect       Disconnect globally
   sound            Toggle global sounds
   top              Toggle 'Always on Top'
   togglebuddy      Toggle buddy list
   showbuddy        Bring Buddy List to foreground
   exit [<time>]    Exit Trillian (optional time delay)
   dock             Toggle Docking
   dock [top/bot/left/right]    Docking position
   offline          Toggle offline contacts
   launch           Launches Trillian or does nothing
                    (Uses registry entry if you chose that option in Trillian
                     installation.  Otherwise, TrillKey must be in the same 
                     directory as TRILLIAN.EXE)
   winamp           start/stop winamp and toggle Trillian sounds
   send [aim/icq/yahoo/msn/irc] [name]   Opens a message window to [name]

ADVANCED FEATURES

Use:    TRILLKEY <command> <window class> [<percent>] [<container name>]

   COMMANDS: show/restore    show window(s)
             hide            hide window(s)
             minimize        minimize window(s)
             attach          attach to container #<percent> in 'previous containers' list
             trans           set transparency on window(s)
             timestamp       Turn on/off timestamping
             clickthrough    toggle clickthrough (*)
             multiim         send messages to multiple windows (**)
   WINDOW CLASSES: all, buddy/contact, private, channel, container, current, console
            Note, 'current' may not work with 'always-on-top' turned on
   PERCENT: Sets transparency in 10% steps.  Leave blank to turn it off.
            For some things, this can be 'on/off/default'
   CONTAINER NAME: performs command only on container specified (can be 'current')

   examples: TRILLKEY hide private - hides all private message windows
             TRILLKEY trans all 50 - sets all windows to 50% transparency
             TRILLKEY time channel on - turns timestamp on on all channels
             TRILLKEY multiim private - sends to all private message windows
             TRILLKEY multiim container IRC - sends to all windows in 'IRC'

TrillKey by Tom Elmer <twelmerii@usa.net>, (C) 2001 - 2002
   http://tometheus.com/v3/TEProjects.html#TRILLKEY
Mailing List:
   http://groups.yahoo.com/group/trillkey/

Trillian by Cerulean Studios (C) 1999 - 2002
   http://ceruleanstudios.com

----------------
(*) CLICKTHROUGH
----------------

Clickthrough is a feature that allows you to set a window on top of 
everything, set it with a level of transparency, and work with windows
underneath it as if the top window didn't exist.  
NOTE: Only works in win2k/XP

------------
(**) MULTIIM
------------

OK, this is a feature I'm working on as a crude hack to send messages to 
multiple people/channels.  
1) Set up your hotkey first
   preferences --> events --> advanced --> new --> hotkey, execute program
   program: trillkey of course :)
   parameters: multiim private, multiim channel, or multiim container
2) Open all windows you want to send a message to
   alternately, you can put all recipient windows in a container.
     using 'multiim container current' sends all messages to -all- 
     message/channel windows in -only- the -top- container.  always-on-top 
     containers may cause problems.  'multiim current' should also work.
   Note: multiim all will send the message to /all/ windows and
     multiim container will send the message to all windows within 
     all containers.
3) type a message in the editbox for one of the windows
4) press your hotkey
5) press ok :)

For an example, I use ctrl-alt-enter to send a message to all private message 
windows and ctrl-shift-enter to send a message to all channel windows.

-----------------------------------------------
MODIFYING A SKIN TO WORK WITH TRILLKEY FEATURES
-----------------------------------------------

Guess what!  You shouldn't have to do this after v0.725.10! :)  It should work
with ANY SKIN!

The only limitation is that you can't name containers/chat rooms 
'<something> console' and expect it to work. :(

Also, trying to find a container named 'current' may not work with 
certain features.

I had to pull some tricks in order to make it work, so it may (will?) break 
with a new release of Trllian.

---------------
VERSION HISTORY
---------------

0.725
=====
.13 send [aim/icq/yahoo/msn/irc] [name]   Opens a message window to [name]
    Start/stop winamp & toggle trillian sounds
.12 revived global away/back
  added container name functionality
  timestamp works in containers & with always-on-top contacts
  changed container MultiIM functionality... 
     must specify 'current' or a name to send to only one container
  with the above change, multiim all and multiim current should work correctly
  added 'attach' command
.11 Docking reenabled, stabilized  (toggle offline contacts stabilized also)
.10 Now WORKS WITH ALL SKINS!  
  (Just don't name your chatroom or container '<something> console')
  Also, made the parameter identification a little looser
    - most commands can be shortened to 3 or 4 letters

MULTI-IM feature
  .04 Option to send messages to windows in containers
  .03 Sends <RETURN> directly to window rather than to keyboard stream
  .02 fixed to work when contact list is always-on-top
      Thanks to Arguile for helping me test this...
.00 Turn TIMESTAMP on/of/default
changed createprocess to ShellExecute

0.724
=====
LAUNCH no longer requires being in the trillian directory.  (uses registry entry)
BUGFIX: I hate it when I mess up... Half of the options were disabled when a flag
was set incorrectly
Added MINIMIZE option.  (Maximize doesn't work due to Trillian's handling of it.)
Changed system() to createprocess() to avoid that pesky command window.
Cleaned up documentation a bit.
TrillKey w/o arguments now launches trillkey.txt instead of the information window.
BUGFIX:  Contact list options didn't work in most skins after 0.71.06 (my fault :) )
Toggle CLICKTHROUGH on windows (works with transparencies in Win2k / XP)


0.71.06
=======
Toggle DOCKING, change docking positions
Set TRANSPARENCY on buddy list
Time delayed trillian EXIT
Toggle OFFLINE CONTACTS

Features only available for BlueTurtle, MdXP v6.9+, or modified skins: 

Ability to hide, show, and set transparency on all trillian windows, all windows 
of a certain class (i.e. all message windows), or only on the current window. 


0.71.05
=======
Toggle SOUNDS 
Toggle BUDDY LIST 
SHOW/HIDE buddy list 
LAUNCH trillian (or do nothing if already launched) 


OLDER FEATURES 
============== 
Bring up PREFERENCES 
Edit AWAY MESSAGES 
Bring up CONNECTION MANAGER 
RECONNECT / DISCONNECT globally 
Toggle "ALWAYS ON TOP"