also in your isdektop you fill data only when it is a desktop window but do nothing if it isnt. the best thing to do would be fill it with $true and $false. this way scripters can use it in direct comparisons for example

if ($dll(blah blah)) //its a desktop window

or

if (!$dll(blah blah)) //its not a desktop window

of course the convention you use is up to you. your current setup however will always return a true value. if its not a desktop window it will return whatever data was (i.e the window handle) so they cant use the ! negate operator. again its up to you it just seems to make more sense and fits easier with mIRC script.

oops meant to edit the previous post sorry


Have Fun smile