on ^*:open:?:*:{ possable.script.text $1- }
on ^*:text:*:?:{ possable.script.text $1- }
alias -l possable.script.text {
if (%script) {
haltdef
window @script
aline @script $1-
}
}
* code untested *
Try out that, It uses the open pm event to get the text if the window doesnt exist, and stops the Pm window opening, if its already open then it cacthes it using text pm event, I think this is better than hiding the window, as if the user already had a pm open to the person, they most likely dont want it hidden.
I also simplified the sending the text to the @script window, i just create it everytime, if it exists already who cares, telling mirc to create it when already in existence is ignored (and is slightly faster than checking for it anyway)