mIRC Home    About    Download    Register    News    Help

Print Thread
#79515 16/04/04 12:07 PM
M
Matrixx
Matrixx
M
Hello everyone,

Would it be possible if someone could help me with this idea that im hoping will work..

Below is a small bit of code that I have in my aliases and when im in a chan, I just type in this:

/g <item>

<item> = being for example if I was searching Google for MSN

Now this is ok for me, but I want it so if someone else in the chan typed say for example !gs then a box would appear for them, then they would just type in what they wanted to search for in Google, or something like that maybe without the box.

The easiest thing is just to open up IE and do it from there, but if this works then I want to use this for finding .torrent files from a forum on the net. In other words let mIRC do the work for me..

Code:
/g { run http://www.google.com/search?q= $+ $1- } 


below is the code that I have in my remotes and when used a small box pops up..

Code:
on *:input:#:{
 if $1 == !gs &amp;&amp; !$2 { say !gs $$?="search for what?" | haltdef }
} 


but when I type in what I want to search for nothing happens, the only thing that does happen is whatever I type in the box appears in the channel only..

what id like this to do is the following
1. type !gs
2. a box appears and in the box I type what im searching for in Google, for example MSN
3. when I click ok, and IE window appears with the results.


Then all I need to do is send this to others in the chan, they add it to there remotes and then they can use this as well...

Hope you can help me confused



Z
Zeusbwr
Zeusbwr
Z
if this is what you want, here smile

Code:
on *:input:#:{ if ($1 == !gs) &amp;&amp; ($2 != $null) { var %gs $$?="Search Google For?" | run http://www.google.com/search?q= $+ %gs }  }



M
Matrixx
Matrixx
M
thank you for the relpy..
Now one small problem thou:
I type in the chan !gs and !gs appears in the chan but nothing else happens

I Type !gs <what im searching for> then the dialog box pops up asking for what I want to search for so again I type <what im searching for> but this time in the box that pops up, then I click ok and an IE window opens up with the results .. great, but its just the bit at the beginning thats needs ironing out if posible, how would this be corrected confused

Joined: Feb 2003
Posts: 3,412
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
The code works great here.. typ !gs serach_word in a channel..

M
Matrixx
Matrixx
M
yes, but im talking about when you type !gs <what your searching> in the chan, the dialog box pops up asking you again what you want to search for confused

What I need it to do is type !gs in the chan, the box pops up asking you what you want to search for, in the box you type in what you want to search for click ok, then an IE window opens up expanded with the results... smirk


Joined: Oct 2003
Posts: 306
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Oct 2003
Posts: 306
on *:input:#:{ if ($1 == !gs) { var %gs $2 | run http://www.google.com/search?q= $+ %gs } }


i think this code may be help you

Joined: Oct 2003
Posts: 306
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Oct 2003
Posts: 306
its !gs text

Z
Zeusbwr
Zeusbwr
Z
lol, well if you would have checked it when i very first posted it it worked like !gs text, but then i saw you wanted an input. so i put an input for you. use this if you want !gs text, OR !gs input. if you leave "text" blank, it will ask you for a input. otherwise it searches for what you ask right away.
Code:
on *:input:#:{ if $1 == !gs { var %gs $iif($2 == $null,$$?="Search Google For?",$2-) | run http://www.google.com/search?q= $+ %gs } }


*edit* also jacksparrows only allows you to search google for one word. the "$2" should be "$2-". GL smile

Last edited by Zeusbwr; 16/04/04 02:44 PM.
M
Matrixx
Matrixx
M
sorry jacksparrow2 but thats half of the code missing with what you have posted ??? lol

Zeusbwr: my apologies, works fine now with that new snippet of code, and thankyou to the others for there imput as well.. much appreciated grin


Joined: Oct 2003
Posts: 306
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Oct 2003
Posts: 306
thnx for the sugestion pal

Joined: Jan 2003
Posts: 423
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Jan 2003
Posts: 423
There is a very nice, long-established Google search script by MEiJ (using sockets) that you can find by clicking here - even if this is not exactly what you want, it may help you work out some problems smile

PM


Link Copied to Clipboard