mIRC Home    About    Download    Register    News    Help

Print Thread
Toggle highlight on/off #195500 26/02/08 03:55 AM
Joined: Feb 2008
Posts: 1
M
MiNdy Offline OP
Mostly harmless
OP Offline
Mostly harmless
M
Joined: Feb 2008
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.

Re: Toggle highlight on/off [Re: MiNdy] #195926 06/03/08 01:51 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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

Re: Toggle highlight on/off [Re: SladeKraven] #195932 06/03/08 06:55 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
what about

sendkeys $(%tb %n {ENTER},0)


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Toggle highlight on/off [Re: argv0] #195949 06/03/08 08:14 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Didn't seem to work for me dude. It works without the {ENTER} but when I put it back it doesn't.

Re: Toggle highlight on/off [Re: argv0] #195962 07/03/08 01:18 AM
Joined: Feb 2006
Posts: 546
J
jaytea Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
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