This is the exact script I was using...
Code:
alias udock { return $findfile($mircdir,ultradock.dll,1).shortfn }
dialog test {
  size -1 -1 100 100
}
on *:DIALOG:test:init:0: {
  dll $udock Dock -1 $dialog($dname).hwnd top
}

After opening the dialog I would type:
//dll $udock UnDock top