mIRC Home    About    Download    Register    News    Help

Print Thread
#189360 06/11/07 08:22 PM
Joined: Oct 2007
Posts: 16
W
Pikka bird
OP Offline
Pikka bird
W
Joined: Oct 2007
Posts: 16
I have looking for a code that would allow me to type ".youtube (Words you want to search)" It would bring up an internet page with the search results for the words you searched.

I know it's something like this, although I think I am far off it.

Quote:
if ($1 == .youtube) { /url http://youtube.com search= $+ $2 }


Please help.

Joined: Dec 2002
Posts: 1,995
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 1,995

Code:

if ($1 == .youtube) url $+(http://www.youtube.com/results?search_query=,$replace($2-,$chr(32),+))


Joined: Jul 2006
Posts: 4,019
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,019
Code:
on *:input:*:if ($1 == .youtube) { url $+(http://youtube.com/results?search_query=,$replace($2-,$chr(32),+),&search=Search) | halt }


Ok RoCk beat me

Last edited by Wims; 06/11/07 08:34 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Well if you want to type .youtube searchwords here in mirc which is an ON INPUT event then use this/...

Code:
on *:INPUT:#hd:{
  if (/ == $left($1,1)) { return }
  elseif ($1 == .youtube) { url  $+(http://www.youtube.com/results?search_query=,$replace($$2-,$chr(32),+)) }
}


But if you want someone to type .youtube in the channel and return a link with search words like this

.youtube salt shaker

http://www.youtube.com/results?search_query=salt+shaker

then use this

Code:
on *:Text:*:#hd:{
  if ($1 == .youtube) { msg # $+(http://www.youtube.com/results?search_query=,$replace($$2-,$chr(32),+)) }
}


LOL this what happens when you take time to explain things lol

Last edited by Lpfix5; 06/11/07 08:40 PM.
Joined: Oct 2007
Posts: 16
W
Pikka bird
OP Offline
Pikka bird
W
Joined: Oct 2007
Posts: 16
Thanks very much!

Joined: Dec 2002
Posts: 1,995
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 1,995

I didn't elaborate because it looked like he already had it going on and only needed that little bit of information.

Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
lol ya but sometimes you know how it is they ask for the rest of the script i just got used to doing it lol


Link Copied to Clipboard