mIRC Home    About    Download    Register    News    Help

Print Thread
Help with something #248493 10/10/14 10:00 AM
Joined: Oct 2014
Posts: 5
B
Bully Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Oct 2014
Posts: 5
Hey,
I would like to make a basic script that will do the next:
Once you do !search Firstname_Lastname it will return
www:example.com/usersearch&Firstname_Lastname/blabla=b

Basically, a link that include the Firstname_Lastname I've placed. So if for example I did: !search Mark_Tiven it will return:
www.example.com/usersearch&Mark_Tiven/blabla=b.

(If you didn't understand what I've tried to exaplain I'll try to explain again..)

Thank you in advance everyone!

Re: Help with something [Re: Bully] #248495 10/10/14 10:14 AM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Are you looking for a dynamic link that actually opens a search engine, enters your search and gives you the actual url or are you looking for something static in a message? Example of a static message:
Code:
on *:text:!search &:#: { 
var %search $2
msg # www.example.com/usersearch& $+ %search $+ /blabla=b
}


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Help with something [Re: Nillen] #248496 10/10/14 10:43 AM
Joined: Oct 2014
Posts: 5
B
Bully Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Oct 2014
Posts: 5
Thanks!! It works!
Another question wink How can I restrict a script to a specific channel? If for example there are two on the same server and I want that only on one of them the commands will be available.

Thank you very very much!

Re: Help with something [Re: Bully] #248498 10/10/14 10:53 AM
Joined: Oct 2014
Posts: 49
JB_uk Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2014
Posts: 49
Simply restrict it by adding the channel name at the top.

From what Nillen said
Code:
on *:text:!search &:#CHANNELNAME: { 
var %search $2
msg # www.example.com/usersearch& $+ %search $+ /blabla=b
}

Re: Help with something [Re: JB_uk] #248500 10/10/14 11:04 AM
Joined: Oct 2014
Posts: 5
B
Bully Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Oct 2014
Posts: 5
Thanks. Another stupid, but seems to be last, question. Other clients can use my script and do that command but for some reason I can't. (I can't use my own script). Is there something I'm missing? Thank you, once again.

Re: Help with something [Re: Bully] #248501 10/10/14 11:08 AM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
You can not trigger text events yourself. Text events are entirely remote based, primary use for bots. If you want to use it yourself while typing, you could either use
Code:
on 1:input:#:{ 
if ($1 == !search) && ($2) { 
var %search $2
msg # www.example.com/usersearch& $+ %search $+ /blabla=b
}
}
Or you could also make it into an alias etc.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Help with something [Re: Nillen] #248503 10/10/14 11:15 AM
Joined: Oct 2014
Posts: 5
B
Bully Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Oct 2014
Posts: 5
Thank you very much, highly appreciated!

EDIT: Oy, now the !search doesn't work for me and I believe it doesn't work for anyone shocked

Last edited by Bully; 10/10/14 11:18 AM.
Re: Help with something [Re: Bully] #248504 10/10/14 11:31 AM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Then you probably didn't include a bracket when you were copy-pasting or something. Try checking for brackets and if that doesn't give you an error message. Post your entire remote.ini file here and I'll check it for errors


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Help with something [Re: Nillen] #248508 10/10/14 01:35 PM
Joined: Oct 2014
Posts: 5
B
Bully Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Oct 2014
Posts: 5
nvm it works.
Now, if I want to make it even better. Is it easy to, instead of simply writing the link, open a link on your browser?
I mean, instead of writing (msg..) it will open it in your browser.

Thank you Nillen very much!

Re: Help with something [Re: Bully] #248517 10/10/14 08:07 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
You can't make it open in other people's browsers but you can your own.

Change 'msg #' in the on input event to 'url -n' smile