mIRC Home    About    Download    Register    News    Help

Topic Options
#195500 - 26/02/08 03:55 AM Toggle highlight on/off
MiNdy Offline
Mostly harmless

Registered: 26/02/08
Posts: 1
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.

Top
#195926 - 06/03/08 01:51 AM Re: Toggle highlight on/off [Re: MiNdy]
SladeKraven Offline
Planetary brain

Registered: 19/12/02
Posts: 3547
Loc: Kent, England
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

Top
#195932 - 06/03/08 06:55 AM Re: Toggle highlight on/off [Re: SladeKraven]
argv0 Offline
Planetary brain

Registered: 13/10/03
Posts: 3918
Loc: Montreal, QC, Canada
what about

sendkeys $(%tb %n {ENTER},0)
_________________________
- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Top
#195949 - 06/03/08 08:14 PM Re: Toggle highlight on/off [Re: argv0]
SladeKraven Offline
Planetary brain

Registered: 19/12/02
Posts: 3547
Loc: Kent, England
Didn't seem to work for me dude. It works without the {ENTER} but when I put it back it doesn't.

Top
#195962 - 07/03/08 01:18 AM Re: Toggle highlight on/off [Re: argv0]
jaytea Offline
Fjord artisan

Registered: 23/02/06
Posts: 546
space between %n and {ENTER} renders that useless

//sendkeys % $+ tb%n{ENTER}
_________________________
"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde

Top