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
Joined:
Jan 2004
Posts: 14
N
no_brain
OP
Pikka bird
OP
no_brain
Pikka bird
N
Joined:
Jan 2004
Posts: 14
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
Joined:
Feb 2003
Posts: 282
S
saragani
Fjord artisan
saragani
Fjord artisan
S
Joined:
Feb 2003
Posts: 282
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
Joined:
Feb 2003
Posts: 282
S
saragani
Fjord artisan
saragani
Fjord artisan
S
Joined:
Feb 2003
Posts: 282
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
Joined:
Jan 2004
Posts: 14
N
no_brain
OP
Pikka bird
OP
no_brain
Pikka bird
N
Joined:
Jan 2004
Posts: 14
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
Joined:
Feb 2003
Posts: 282
S
saragani
Fjord artisan
saragani
Fjord artisan
S
Joined:
Feb 2003
Posts: 282
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
Joined:
Jan 2004
Posts: 14
N
no_brain
OP
Pikka bird
OP
no_brain
Pikka bird
N
Joined:
Jan 2004
Posts: 14
!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
Joined:
Feb 2003
Posts: 282
S
saragani
Fjord artisan
saragani
Fjord artisan
S
Joined:
Feb 2003
Posts: 282
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
Joined:
Jan 2004
Posts: 3
Helsinki, Finland
Z
Zachu
Self-satisified door
Zachu
Self-satisified door
Z
Joined:
Jan 2004
Posts: 3
Helsinki, Finland
/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
Joined:
Sep 2003
Posts: 4,230
D
DaveC
Hoopy frood
DaveC
Hoopy frood
D
Joined:
Sep 2003
Posts: 4,230
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
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Website
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
Forum Rules
·
Mark All Read
Contact Us
·
Help
·
mIRC Homepage