Good idea, and well scripted, but mIRC already has built-in locking features.
/help /showmirc
/showmirc -mnrstxopl
Manipulates the display of the main mIRC window, where -n = minimize, -r = restore, -s = show, -t = tray, -x = maximize, -o = on top, -p = not on top, -m = minimize according to tray settings.
The -l switch can be used with the -nt switches to lock mIRC.
Couple of things:
-Press control and click minimize IRC it locks and minimizes it.
-In the Options > Display > Options > Tray: Gives options on how mIRC should do on startup
-As well as Options > Other > Lock