• You can use $editbox($target) to get the contents of the editbox (pre-completion).
  • You can use $editbox($target).selstart to get the location of the tab completion "hotspot" (note that mIRC always treats the start of the selection as the hotspot even if a peice of text is selected and the cursor is actually at the rightmost end).
  • $cmdbox will return $true if the tab completion event was triggered from the command-box.


All of this combined leaves you with:
Code:
on *:tabcomp:*:{
  echo -a Original text: $editbox($target, $iif($cmdbox, 1, 0))
  echo -a Completed text: $1-
  echo -a Tab completion hotspot: $editbox($target, $iif($cmdbox, 1, 0)).selstart
}


I can't reproduce your /haltdef problem here, the script carries on processing.


Spelling mistakes, grammatical errors, and stupid comments are intentional.