Since i've been developing my WoWBasic library I've come across a few better ways to do things. I didn't want to really inject any code so i found other ways to things. Here is a sample on how Target Selection with a GUID.
i have custom libraries to do most of my work but you should be able to understand what's going on.
Code:--Target Unit By GUID-- Public sub TargetUnit(byval Unit as cUnit) Memory.WriteInt64(&HC6E968, Unit.ID) Chat.SendMessage("/targetlasttarget") End Sub