mIRC Homepage
Posted By: MiNdy Toggle highlight on/off - 26/02/08 03:55 AM
Hi. Is it possible to create a script that would toggle highlight on/off with just one command without having to go to options and enable/disable it there? Doesn't sound too easy to a beginner like me but maybe someone could try to help.
My mIRC version is 6.21.
Posted By: SladeKraven Re: Toggle highlight on/off - 06/03/08 01:51 AM
I don't have version 6.21 and I know that the highlight feature was moved into the address book.

Maybe you should upgrade to the latest version. Here's a way to do it in 6.31.

Code:
alias sendkeys {
  var %object = sendkeys $+ $ticks
  .comopen %object WScript.Shell
  if ($com(%object)) { .comclose %object $com(%object,SendKeys,3,bstr,$1-) }
}

alias highlight { 
  sendkeys $+(%,tb)
  sendkeys $+(%,n)
  sendkeys {ENTER}
  echo -a Highlight is now $iif($highlight == $false,on.,off.)
}


It flashes suddenly because it opens up the dialog, checks/uncheks option and closes it again. I'm sure there'll be an actual command one day though.. smile
Posted By: argv0 Re: Toggle highlight on/off - 06/03/08 06:55 AM
what about

sendkeys $(%tb %n {ENTER},0)
Posted By: SladeKraven Re: Toggle highlight on/off - 06/03/08 08:14 PM
Didn't seem to work for me dude. It works without the {ENTER} but when I put it back it doesn't.
Posted By: jaytea Re: Toggle highlight on/off - 07/03/08 01:18 AM
space between %n and {ENTER} renders that useless

//sendkeys % $+ tb%n{ENTER}
© mIRC Discussion Forums