Okay ive been working on it for about an hour (remember IM NEW) and is quite handy. I cba submitting to site etc. so here is the script. Basically allows you to search google & google images by typing:
/google Frogs [Seraches google for frogs]
/googleimage Frogs [Searches google images for frogs]
Its for anybody to claim however I would like it if you did calim and submit you left some thanks to me :')
code:
function OnGetScriptCommands(){
var commands = "<ScriptCommands>";
commands += " <Command>"
commands += " <Name>google</Name>"
commands += " <Description>Search google easily!</Description>"
commands += " </Command>"
commands += " <Command>"
commands += " <Name>googleimage</Name>"
commands += " <Description>Search google images easily!</Description>"
commands += " </Command>"
commands += "</ScriptCommands>"
return commands;
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
if(/^\/google\s(.+)$/i.test(Message)) {
var Param = RegExp.$1;
MsgPlus.DisplayToast("Goole Searcher", "You have searched for "+Param+" Please wait.");
new ActiveXObject("WScript.Shell").Run("http://www.google.co.uk/search?hl=en&q="+escape(Param));
return "";
}
if(/^\/googleimage\s(.+)$/i.test(Message)) {
var Param = RegExp.$1;
MsgPlus.DisplayToast("Goole Image Searcher", "You have searched for "+Param+" Please wait.");
new ActiveXObject("WScript.Shell").Run("http://images.google.co.uk/images?hl=en&q="+escape(Param));
return "";
}
Also thanks to the people who helped me in the thread I made about reading the message that was typed.