mIRC Homepage
Posted By: sparta CTRL + Enter - 18/11/04 10:42 AM
I have this code:
Code:
on ^*:TEXT:*:?:{
  settime
  set %q.text $1-
  if ($active == $chr(45) $+ psyBNC) { ech_bnc | goto end }
  echo $nick %tstmp $+ $chr(3) $+ %cbrackets $+ %right $+ $chr(3) $chr(3) $+ $color(own text) $+ $nick $chr(3) $+ %cbrackets $+ %left $+ $chr(3) $+ $chr(3) $+ $color(own text) %q.text | halt
  :end
}

but when i press CTRL and press Enter, then its by passed, how to prevent this ? :tongue:
Posted By: tidy_trax Re: CTRL + Enter - 18/11/04 12:04 PM
It's not 'bypassed', the on text event is never called when you send messages, use on input.
Posted By: sparta Re: CTRL + Enter - 18/11/04 12:06 PM
how would i make that then ? im not shurehow to use use $ctrlenter :tongue:
Posted By: tidy_trax Re: CTRL + Enter - 18/11/04 12:08 PM
You don't need to use $ctrlenter at all, you only need to use $ctrlenter if you want to keep support for it in your script (eg. being able to send /commands to the channel without using /say or similar)
Posted By: sparta Re: CTRL + Enter - 18/11/04 12:15 PM
I want the text to appear as the same way it does on /msg.. now it dont..

example:

« nick » testing <<-- without CTCL + Enter.
<nick> /echo -a testing <<-- with CTRL + Enter.

look at the brackets.. that means it dont trigger my "Theme", how can i do it to trigger even due CTRL + Enter is pressed? :tongue:
Posted By: tidy_trax Re: CTRL + Enter - 18/11/04 12:26 PM
Code:
on *:input:*:{
  if (!$istok(/ $readini($mircini,text,commandchar),$left($1,1),32)) || ($ctrlenter) {
    .msg $active $1-
    echo -abcflirt &lt;whatever you like&gt;
    haltdef
  }
}
Posted By: sparta Re: CTRL + Enter - 18/11/04 12:53 PM
Thanx, that gave me the idea how its done, with some rewriting i got it to work as i wanted.. smile
© mIRC Discussion Forums