Highlight

By mSLChampagne on Nov 28, 2010

Allow or disallow highlights via script.

alias highlights { 
  if (!$lock(com)) {
    var %obj = wsh $+ $ticks
    .comopen %obj wscript.shell
    if (!$comerr) && ($com(%obj)) { 
      if ($highlight = $false) && ($1 = enable) goto wsh
      if ($highlight = $true) && ($1 = disable) goto wsh
      echo $color(info) -a Highlights are already $1 $+ d.
      .comclose %obj
    }
    else echo $color(info) -a Could not create object WScript.Shell.
    return
    :wsh
    abook -h
    .comclose %obj $com(%obj,sendkeys,1,string,{TAB 6} {ENTER})
    echo $color(info) -a Highlights are now $1 $+ d.
  }
  else echo $color(info) -a COM must be unlocked to use /highlights.
}

Comments

Sign in to comment.
Burrito   -  Nov 28, 2010

Com for highlights. Typical Champagne!

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.