Home
About
Download
Register
News
Help
Register
Log In
Forums
Scripts & Popups
when another says !add blabla,this how to get...
Forums
Active Threads
Search
Who's Online
Help
Print Thread
when another says !add blabla,this how to get...
#
67941
15/01/04
05:09 PM
N
no_brain
no_brain
N
How to get the "blabla" and the "this" ? ^^
Last edited by no_brain;
15/01/04
05:23 PM
.
Copy Link to Clipboard
Re: when another says !add blabla this how to get...
#
67942
15/01/04
05:18 PM
S
saragani
saragani
S
on 1:TEXT:!add*:*: {
set %b $2
set %c $3
}
Now %b = blabla and %c= this
Copy Link to Clipboard
Re: when another says !add blabla this how to get...
#
67943
15/01/04
05:20 PM
S
saragani
saragani
S
I don't really understand what you want... You want only the second and the third word, and each one of them will be added to a seperate variable??
Or do you want to take the whole text from the second word and put it in a variable??
For the second option you will need:
set %b $2-
Copy Link to Clipboard
Re: when another says !add blabla this how to get...
#
67944
15/01/04
05:24 PM
N
no_brain
no_brain
N
Sorry, I have forgotten this
with a ,
So the users can add questions and answers
Copy Link to Clipboard
Re: when another says !add blabla this how to get...
#
67945
15/01/04
05:29 PM
S
saragani
saragani
S
Ok, would you mind explaning??
I didn't get the last part.
Copy Link to Clipboard
Re: when another says !add blabla this how to get...
#
67946
15/01/04
05:33 PM
N
no_brain
no_brain
N
!add question,answer
and I like to have the question and the answer ^^
Copy Link to Clipboard
Re: when another says !add blabla this how to get...
#
67947
15/01/04
05:47 PM
S
saragani
saragani
S
Ok....
Then do this:
on 1:TEXT:!add*:*: {
tokenize 44 $2-
set %question $1
set %answer $2
}
Copy Link to Clipboard
Re: when another says !add blabla this how to get...
#
67948
16/01/04
10:04 PM
Z
Zachu
Zachu
Z
/tokenize isn't very good idea in all scripts
I think "Teh Thing" you were looking for is $gettok
Code:
$gettok(Hi! My name is John,3,32)
returns "name"
First parameter is text
Second parameter is "which token"
Third parameter is ASC code for character you want to separte all tokens
Copy Link to Clipboard
Re: when another says !add blabla,this how to get...
#
67949
17/01/04
06:28 AM
D
DaveC
DaveC
D
on *:TEXT:!add*:*: {
set %before.the.comma $mid($gettok(. $2-,1,44),3)
set %after.the.comma $gettok(. $2-,2-,44)
}
i use $mid($gettok(. $2-,1,44),3) and not $gettok($2-,1,44) as a line begining with comma well have that comma ignored.
Copy Link to Clipboard
Hop To
News and Discussions ------
Latest News
General Discussion
Support ------
mIRC Help
Connection Issues
Scripts & Popups
Development ------
Feature Suggestions
Developers
Bug Reports
Print Thread
Switch to Threaded Mode
Show Likes
Link Copied to Clipboard
Forum Rules
·
Mark All Read
Contact Us
·
Help
·
mIRC Homepage