Code:
if ($devent == mouse) { 
  if ($did == ID) { 
    if ($hget(ldid,ldid) isnum 1-) && ($hget(ldid,ldid) != $did) && ($did isnum 1-) {
      ;Commands for when you move into a did from a did.
    }  
    elseif ($hget(ldid,ldid) == 0) && ($did isnum 1-) {
      ;Commands for moving into a did from the dialog.
    }
    elseif ($hget(ldid,ldid) isnum 1-) && ($did == 0) { 
      ;Commands for moving out of a did onto the main dialog.
    }
    elseif ($hget(ldid,ldid) isnum 1-) && ($did isnum 1-) {
      ;Commands for moving out of a did and into another did.
    }
  }
  hadd -m ldid ldid $did
}


$hget(ldid,ldid) is the last did that the mouse was over.


New username: hixxy