[script] Context Menu Search v0.3.1

Added by Mr. BS almost 10 years ago

This script is a simple example to easy lookup keywords in web services by right click menu. The sites presented in script are just examples, the idea is to user get the example as base to make your own menu.

For more info about making custom menus read the Wiki article Scripting Menus.


Video demo:

<video controls>
<source src=";>
Your browser does not support the video tag.

Video 2


- Highlight any keyword/phrase to populate clipboard, then right click a channel blank area to use the submenu "Search for" or use the respective site alias shortcut in editbox.
- To make your own menu entries, pay attention to alias sp1/sp2 used in <keywords> query string, in most cases - if not all, replacing <space> by <+> is enough, if you prefer or some service refuses to work, use the html space encode %20.
- When adding new sites, use the syntax {key} in url, then the script will automatically inject the input. The examples are very clear, if still need help just ask.
Ps: (ALIASES) always has priority over scripts, then be sure to use unique engine keywords shortcut to take effect.


  • v0.3.1
    - Renamed some search engines to avoid conflict to built in commands like /ub (unban).
    - Removed Grooveshark (service discontinued) and added Twitch to example list (as if needed more :P).
    - More minor changes.
  • v0.3
    - A third parameter to $run command, if any value is specified, the script will replace dots by +. Vide HD-Torrents in example.
    - Minified a little the code, small optimizations here and there.
    - More search engines in demo list.
    - New identifier $f to return a folder unicode "icon". Check screenshots.
  • v0.2
    - Now menu is hidden if clipboard is empty.
    - Now it is a lot easier to add new sites, just use the syntax {key} where you need the keywords in url. Example:{key}
    - Several optimizations and cleanup, thanks kr0n for the idea.
    - New engine to examples: Vimeo (/vm).
  • v0.1.1
    - Added editbox search engine keywords shortcuts. Example, /y <keyword> will perform a Youtube search. If no keyword parameter is provide, it will use the clipboard content or break if no plain text is available.
    - New engine to examples: Reddit (/re).
    - Now the menu also is visible for query and status windows.
    - Added alias to set the max chars limit to context menu display. Limit is not applied for the search. Default 200.
  • v0.1
    - Initial release.


; Context Menu Search
; v0.3.1 by pereba

menu channel,query,status {
  $iif($cb(1),Search for $qt($mid($v1,1,15) $+ $iif($len($v1) > 15, ...)))
  .AdiIRC Wiki:adi
  .Firefox Addons:f
  .$f Google
  ..Google Images:gi
  ..Google Define:gd
  ..Google Play:gp
  ..Google Shopping:gs
  .Ip Info:ipi
  .$f mIR $+ $chr(5607) related
  ..mIR $+ $chr(5607) Forums:mirc
  .Spotify $chr(55357) $+ $chr(56571):spo
  .$f Subtitles
  .Start Page:spage
  .Urban Dictionary:urb
  .$f Torrents
  ..Manicomio Share:ma
  ..The Pirate Bay:pi
  .$f Movies Info
  ..Rotten Tomatoes:rt
  .$f Videos

alias adi $run($1-,{key})
alias am $run($1-,{key})
alias bi $run($1-,{key})
alias du $run($1-,{key})
alias e $run($1-,{key})
alias f $run($1-,{key}&cat=all)
alias g $run($1-,{key})
alias gi $run($1-,{key})
alias gd $run($1-,{key}&tbs=dfn:1)
alias gp $run($1-,{key})
alias gs $run($1-,{key}&btnG=Search+Products&show=dd&scoring=p)
alias groo $run($1-,{key})
alias h $run($1-,{key}/)
alias m $run($1-,{key}/results)
alias re $run($1-,{key})
alias spage $run($1-,{key})
alias tw $run($1-,{key})
alias urb $run($1-,{key})
alias pi $run($1-,{key}/0/99/0)
alias im $run($1-,{key}&s=all)
alias rt $run($1-,{key})
alias tm $run($1-,{key}, 1)
alias y $run($1-,{key})
alias ll $run($1-,{key})
alias vm $run($1-,{key})
alias hdt $run($1-,{key}, 1)
alias l $run($1-,{key})
alias ka $run($1-,{key})
alias ma $run($1-,{key})
alias rut $run($1-,{key})
alias td $run($1-,{key}&cata=yes)
alias yf $run($1-,{key})
alias spo $run($1-,{key})
alias ipi $run($1-,{key})

alias -l run { if (!$1) && (!$cb(1)) { return } | run $replacex($2,{key},$sp1($iif($1,$1,$cb(1)),$3))) }

; replace space by +
alias -l sp1 return $regsubex($iif($2,$plus($1),$1),/(\40)/g, $chr(43))

; folder icon
alias -l f return $chr(55357) $+ $chr(56514)

; replace dot by +
alias -l plus return $regsubex($1-,/(\.)/g, +)

; replace space by %20
alias -l sp2 return $regsubex($1-,/(\s)/g, % $+ 20)

✔ mIRC compatible.