DmU DLL v1.55

Thanks to Naru, DragonZap, and anyone that offered a suggestion.


Welcome to Dmu!. This DLL is for all working DLL versions of mIRC.

The main reason you'd want to use a dll is that processing information in a DLL can be far faster
than doing so in a script, so for intensive data processing a DLL would be more efficient. İmIRC Help

I created this DLL for many reasons, its main purpose to provide the user with actions not yet possible within mIRC; and to change some of mIRC's static options. I had never seen any of the functions in this dll used before, except for 1, which is the one used to change mIRC's icon. Below is the list of functions and their usages.



ChangeIcon
MircIcon
Tile
Cascade
LockWindow
UnlockWindow
SizeGrip
SbUndock
SbDock
DockState
SbAttach
SbAdd
SbRemove
SbDestroy
SbSize
SbResize
SbLocate
Register
MenuRet
Bolderize
Italicize
Mark
Editbox
TbFloat
TbDock
DllInfo
About DmU

 


ChangeIcon


Usage:
//echo -a $dll(dmu.dll,ChangeIcon,@|# window > c:\icon.ico)
//dll dmu.dll ChangeIcon @|# window > c:\icon.ico


This function allows you to change the icon of any window or dialog. This does include any mIRC window, such as the status window, or any channel window. It is impossible to change the icons in the mIRC switchbar because mIRC draws it internally, don't ask if I can do it, I can't.

The first parameter is window. This can be a #channel, an @window, the Status Window, a dialog, pretty much any window you can think of. If you're in doubt use $active. The 2nd parameter, following the > symbol is the location of the icon on your computer, c:\icon.ico or c:\mirc\main.ico etc. I have provided this fun snippet (along with an icon) that changes the channel window icon every time you join a new channel:
on *:join:#:var %x $dll(dmu.dll,ChangeIcon,$chan > c:\example.ico)
please feel free to use this as you please. :)

 


MircIcon


Usage:
//echo -a $dll(dmu.dll,MircIcon,c:\icon.ico)
//dll dmu.dll MircIcon c:\icon.ico


This function allows you to change mIRC's titlebar icon.
The first parameter being the location of the icon.


HINT: To change any icon back to its normal state, put some random data in the file location parameter.
Example:
//echo -a $dll(dmu.dll,MircIcon,blah)
//echo -a $dll(dmu.dll,ChangeIcon,Status Window > blah)

 


Tile


Usage:
//echo -a $dll(dmu.dll,Tile,vertical | horizontal)
//dll dmu.dll Tile vertical | horizontal


This function allows you to tile mIRC's windows in 2 different ways, horizontally or vertically. I find this useful for any script that has it's custom menubar, and want's to imitate mIRC's.

The first parameter MUST either be vertical or horizontal to work.
Example:
//echo -a $dll(dmu.dll,Tile,vertical)

 


Cascade


Usage:
//echo -a $dll(dmu.dll,Cascade,.)
//dll dmu.dll Cascade


This function allows you to cascade mIRC's windows.
The first parameter is unused, so a period is inserted to fill the blank.

 


LockWindow


Usage:
//echo -a $dll(dmu.dll,LockWindow,window/dialog)
//dll dmu.dll LockWindow window/dialog


This allows you to lock the position of any window or dialog so it cannot be resized in any format.
(added by request)
This can be used with any window or dialog.

 


UnlockWindow


Usage:
//echo -a $dll(dmu.dll,UnlockWindow,window/dialog)
//dll dmu.dll UnlockWindow window/dialog


This allows you to unlock the position of any window or dialog so it can be resized again.
This can be used with any window or dialog.

 


SizeGrip


Usage:
//echo -a $dll(dmu.dll,SizeGrip,window/switchbar)
//dll dmu.dll SizeGrip window/switchbar


This function allows you to make the editbox in your specified window resizable. If you specify the word switchbar, your switchbar will become resizable.
After typing the command, wait a few seconds and move your mouse over the editbox/switchbar. Your mouse should have an up and down arrow, click and drag to stretch the size of the editbox or switchbar. If this does not work immediately, wait a few seconds, do not worry.
Example:
//echo -a $dll(dmu.dll,SizeGrip,switchbar)
//dll dmu.dll SizeGrip #scripting

 


SbUndock


Usage:
//echo -a $dll(dmu.dll,SbUndock,.)
//dll dmu.dll SbUndock


*Disclaimer: if your switchbar is docked right or bottom in mIRC, the buttons will not appear in the window! This reason is unknown, but currently being worked on.

This unique function allows you to undock the switchbar from mIRC. This means the switchbar(where all your windows are shown) is removed from the main mIRC window and placed in a resizable window all to itself. Clicking the X button will Redock the window inside mIRC.

 


SbDock


Usage:
//echo -a $dll(dmu.dll,SbDock,.)
//dll dmu.dll SbDock


This function does the opposite of the above mentioned. If you do Undock your switchbar,this allows you to re-dock it inside mIRC, no matter where you have undocked it.

 


DockState


Usage:
//echo -a $dll(dmu.dll,DockState,.)


This function displays the state of the switchbar, being docked or undocked. S_ON is returned if the switchbar is undocked. S_OFF is returned if the switchbar is part of mIRC. This only works if you use the SbUndock function to undock your switchbar.

 


SbAttach


Usage:
//echo -a $dll(dmu.dll,SbAttach,window/dialog name)
//dll dmu.dll SbAttach window/dialog


This function attaches the switchbar into any window or dialog of your choice.
Example:
//echo -a $dll(dmu.dll,SbAttach,@ok)

 


SbAdd


Usage:
//echo -a $dll(dmu.dll,SbAdd,window/dialog name)
//dll dmu.dll SbAdd window/dialog


This function allows you to add a dialog or @window to the switchbar X and Y coordinates must be 1 and 1.
Basically, if you make an MDX dialog and use this function, you can have anything dialog related on your switchbar. Here is a brief snippet of code for an example:
dialog test {
size 1 1 800 500
title ""
button "",1, 0 0 0 0,cancel
button "hello",2, 10 3 50 20
}
on *:dialog:test:init:0:{
dll mdx.dll SetMircVersion $version
dll mdx.dll MarkDialog $dname
dll mdx.dll SetDialog $dname style staticedge
echo -a $dll(dmu.dll,SbAdd,$dname)
}

Also, if you want to dock your own switchbar to mIRC's switchbar, just have the dialog/@window completely cover it. My suggested w and h is 800 500. That may differ for you. This allows the user to move around the dialog/@window in mIRC, just like the switchbar. If you have trouble moving it around and the switchbar is completely covered by your window, try clicking the very edges, like the far left edge, etc. to move it around.

 


SbRemove


Usage:
//echo -a $dll(dmu.dll,SbRemove,window/dialog name)
//dll dmu.dll SbRemove window/dialog


Exact opposite of SbAdd. It takes out the window or dialog you stuck into the switchbar, and puts it back into mIRC.

 


SbDestroy


Usage:
//echo -a $dll(dmu.dll,SbDestroy,.)
//dll dmu.dll SbDestroy .


Removes the SwitchBar from mIRC altogether.

 


SbSize


Usage:
//echo -a $dll(dmu.dll,SbSize,height/width)


Returns the specified height or width of your switchbar in integer format.

Example:
//echo -a $dll(dmu.dll,SbSize,height)

 


SbResize


Usage:
//echo -a $dll(dmu.dll,SbResize,w > h)
//dll dmu.dll SbResize w > h


Allows you to resize the w and h of the SwitchBar.

 


SbLocate


Usage:
//echo -a $dll(dmu.dll,SbLocate,.)


This function returns the position or location of the switchbar.
This could either be top,bottom,left, or right.
(added on request)

 


Register


Usage:
/timera 0 0 /dll dmu.dll Register name


This is one of the coolest functions I think I added. This allows you to change the text of the 'Unlicensed Copy' in the about dialog to anything you choose. My only problem with this is that it must be done with a timer.

The first parameter is the name you wish to replace the Unlicensed Copy with. After you set the timer as above, you can open the About dialog box at any time to see the name you chose. To change the name, reset the timer. To change it back, turn the timer off. I'm working on making it so timers are unnecessary.

 


MenuRet


Usage:
//echo -a $dll(dmu.dll,MenuRet,@|#)
//dll dmu.dll MenuRet @name/#channel


This is a bonus function I included. It allows you to access a window's popup menu without right-clicking.
The first parameter here is the channel or @window name again.
Name = the title of your window such as
#channel, Status Window, @MyWin etc.

 


Bolderize


Usage:
//echo -a $dll(dmu.dll,Bolderize,dialogname > id)
//dll dmu.dll Bolderize dialogname > id


This is a function enables you to make certain controls in a dialog bold. These include: editbox button text check radio box combo
(added by Request)

 


Italicize


Usage:
//echo -a $dll(dmu.dll,Italicize,dialogname > id)
//dll dmu.dll Italicize dialogname > id


This is a function enables you to make certain controls in a dialog italic. These include: editbox button text check radio box combo

 


Mark


Usage:
//echo -a $dll(dmu.dll,Mark,dialogname)
//dll dmu.dll Mark dialogname


This function marks a dialog for control editing. This only needs to be used if a function specifies the use of 'Mark'.

 


Editbox


Usage:
//echo -a $dll(dmu.dll,Editbox,style > id)
//dll dmu.dll Editbox style > id


This function allows you to change a few styles of dialog editboxes. Before using this command, the Mark function must be used. There are 3 possible styles I have included. They are:
upper - this makes it so that no matter what is entered in the editbox, it is in uppercase.
lower - this makes it so that no matter what is entered in the editbox, it is in lowercase.
number - and this makes it so that no matter what is entered in the editbox, it is a numerical value.


Example:
//echo -a $dll(dmu.dll,Mark,MyDialog)
//echo -a $dll(dmu.dll,Editbox,upper > 2)

 


TbFloat


Usage:
//echo -a $dll(dmu.dll,TbFloat,.)
//dll dmu.dll TbFloat


This function floats the toolbar, similar to SbUndock

 


TbDock


Usage:
//echo -a $dll(dmu.dll,TbDock,.)
//dll dmu.dll TbDock


This function re-docks the toolbar into mIRC. Similar to SbDock

 


DllInfo


Usage:
//echo -a $dll(dmu.dll,DllInfo,.)
//dll dmu.dll DllInfo


Returns information on DmU dll.

 


About Dynamic mIRC Utilities


v1.55 2/12/02
-Added 'TbDock'
-Added 'TbFloat'
-Added 'SbLocate'
-Fixed minor bugs
-Fixed Readme errors

v1.54 2/10/02
-Added 'SbResize' fixed completely
-Added 'SizeGrip'
-Added 'UnlockWindow'
-Added 'Editbox'
-Added 'Mark'
-Added 'Italicize'
-Added 'Bolderize'

v1.53 2/06/02
-Added 'LockWindow'
-updated more error checking

v1.52 2/05/02
-Added very beta 'SbResize'
-Added 'SbRemove'
-Updated Tile,SbAttach,and SbAdd to error out
-Compatibility re-added to previous versions of mIRC
-Added 'SbSize'

v1.5 2/03/02
Fixed to work with mIRC 6.0
-Added 'SbDestroy'

v1.4 1/23/02
-Added SbAttach
-Added SbAdd


Errors are return in the S_ERR format.
Function completions are returned in the S_OK format.

Questions? Comments? Complaints? Quandaries? Anxieties?
AIM : SoulEata
Memo Soul_Eater on irc.dal.net
or email souleata@beer.com