kTools.dll Readme

Quick Function Links
 
Known Bugs
Future Plans
Contact Me
Thanks To

CreateSb
Parameters: (no parameters)
Description: This is the first function that you want to call. This creates the intial statusbar.
Examples: /dll ktools.dll CreateSb .
SbSetParts
Parameters: pos0 [pos1 pos2 pos3 pos4 pos5 ... pos256]
Description: This sets the parts of the statusbar. Also know as the cells, or the parts. You can have as many parts as you want up to 256. This is the max windows will go. Not my fault. The positions are based on 0. So "100 200" would create 2 cells; First one is 100 wide, and the second one is 100 wide. If you specify -1 at the end, it will fill the rest of the statusbar with that cell.
Examples: /dll ktools.dll SbSetParts 100 200 300 -1
/dll ktools.dll SbSetParts 300 500
SbSetText
Parameters: cell > style > text
Description: This sets text to the given cell with the given style. The styles are popout and noborder. If you specify anything else like asdf, it will default to the regular style. The cell number is zero based. That means the first cell would be cell number 0. Then the text is self explanitory.
Examples: /dll ktools.dll SbSetText 0 > noborder > Hello!
/dll ktools.dll SbSetText 4 > asdf > Hey There!
SbSetPadding
Parameters: padding
Description: This sets the amount of room from the top of the statusbar, to the bottom of the MDI(Multiple Dialog Interface). However one of my testers(nickster) set the padding to 3424234234. And therefore locked himself out. I actually didnt care, but now you cannot set the padding passed the MDI.
Examples: /dll ktools.dll SbSetPadding 5
SbSetIcon
Parameters: cell > [index,]icon
Description: This sets the icon to the given cell. Once again the cell is zero based. The index is optional, if you dont sepcify an index, it defaults to 0. If you were opening an icon file that had 1 icon, you wouldnt need to worry about this. Or if you wanted to use the first icon in an .exe/.dll file.
Examples: /dll ktools.dll SbSetIcon 0 > icon.ico
/dll ktools.dll SbSetIcon 3 > 4,mirc.exe
SbSetBgColor
Parameters: rgb|default
Description: This sets the background of the statusbar. I frankly find any color combination ugly as hell, but you might like it. Pass in a $rgb() value to change it, or pass in default to change it back to the default value.
Examples: /dll ktools.dll SbSetBgColor $rgb(0,0,0)
/dll ktools.dll SbSetBgColor default
SbSetTipText
Parameters: cell > text
Description: This adds a tooltip to a cell. However, the catch is that the tooltip will not display if the cell has an icon and no text; or If the text cannot fully fit in the cell. Believe me, I find this just as stupid as you, and will code a work around one day or another, but thats what Microsoft thought would be best :-).
Examples: /dll ktools.dll SbSetTipText 2 > This is a tooltip
SbAutoResize
Parameters: true|false
Description: Turns AutoResize on or off. After you turn it on, in order for the cells to "autosize" you must call SbSetText. Will resize everything for you. For some reason if you specify a lot of text, it adds extra padding. I dunno why, so dont bother asking..
Examples: /dll ktools.dll SbAutoResize true
DestroySb
Parameters: (no paremeters)
Description: This just destroys the statusbar. Simple enough, I got a request for it, so I added it.
Examples: /dll ktools.dll DestroySb .
CreatePb
Parameters: id > style
Description: This creates a progressbar at the given cell. The only style available is smooth. Anything else will default to the bars look. Note: If you change the widths, it will destroy the progressbar. Oh, and you can add the progressbar to the last cell, but it just doesnt look right. Also, it will not look like you have created a progressbar before you set the parts, but you have.
Examples: /dll ktools.dll CreatePb 1 > asdf
/dll ktools.dll CreatePb 0 > smooth
PbSetParts
Parameters: pos min max
Description: This sets the progressbar parts. Simple enough eh?
Examples: /dll ktools.dll PbSetParts 50 0 100
PbSetBarColor
Parameters: rgb|default
Description: Sets the color of the progressbar. If you specify default, it defaults back to normal.
Examples: /dll ktools.dll PbSetBarColor $rgb(255,255,255)
/dll ktools.dll PbSetBarColor default
PbSetBgColor
Parameters: rgb|default
Description: Sets the background color of the progressbar. If you specify default, it defaults back to normal.
Examples: /dll ktools.dll PbSetBgColor $rgb(0,0,0)
/dll ktools.dll PbSetBgColor default
DestroyPb
Parameters: (no parameters)
Description: Destorys the Progressbar.
Examples: /dll ktools.dll DestroyPb .
DockWindow
Parameters: hwnd > left|right
Description: This "docks" any window to the right or left of mirc. The only ones I activly support and acknoledge work are dialogs and @windows tho, so if you dock winamp (which btw is possible) and it messes up your entire computer, dont blame me :-). The perferred styles for docking @windows is in the example, others work, but not to the same effect :-)
Examples: //dialog -m brad brad | //dll ktools.dll DockWindow $dialog(brad).hwnd > right
//window -pdh +d @brad 100 100 100 100 | dll ktools.dll DockWindow $window(@brad).hwnd > left
dkChangeSide
Parameters: right|left
Description: This just changes which side the docked window is docked to.
Example: /dll ktools.dll dkChangeSide right
UnDock
Parameters: (no paremeters)
Description: This undocks the docked window, it also destroys it.
Example: /dll ktools.dll UnDock .
CountIcons
Parameters: File_name
Description: This counts how many icons are in an exe/dll/ico file.
Example: /dll ktools.dll CountIcons mirc.exe
DockToolbar
Parameters: hwnd
Description: This docks a hwnd to the toolbar
Example: /dll ktools.dll DockToolbar $dialog(brad).hwnd
DockSwitchbar
Parameters: hwnd
Description: This docks a hwnd to the switchbar.
Example: /dll ktools.dll DockSwitchbar $dialog(brad).hwnd
Events
Parameters: [LCLICK|LDCLICK|RCLICK|RDCLICK cell] | [StatusbarMove position]
Description: This isnt as hard to understand as the parameters may seem. Basically you make a signal, like the one below. And when you click the statusbar, it sends LCICK for left clicking, RCLICK for right clicking and the same for double clicking. The cells are based on 1. So when you click the first cell, its id 1, not 0. This can be usefull for popups mabye, or changing text when they double click a cell, like in Auto-Cad. The other event, is StatusbarMove. This is called (generally) when the Statusbar is moved positions. It sometimes triggers when you hide/show it I found. But this is the best I could do. This is the only message I could find, that wasnt called while sizing the dialog. Postion 1 = top, 2 = left, 3 = right, 0 = bottom. Pretty self explanitory.
Example: on *:SIGNAL:ktools: { echo $1- }
DllInfo
Parameters: (no parameters)
Description: Just info bout da dll :-)
Examples: /dll ktools.dll DllInfo .