mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2015
Posts: 2
G
Ghiza Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
G
Joined: Sep 2015
Posts: 2
If one message:
Code:
Good morning, everyone, everybody fine? 

I want to repeat with contents are:
Code:
ing, everyone, everybody fine? 

Characters removed are:
Code:
Good morn

Script is look like?
Thank you.

Last edited by Ghiza; 26/09/15 02:46 PM.
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
What general rule are you trying to enforce here?

Joined: Sep 2015
Posts: 2
G
Ghiza Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
G
Joined: Sep 2015
Posts: 2
Originally Posted By: Loki12583
What general rule are you trying to enforce here?

I want to eliminate some characters.
If you need to eliminate 4 words in the first place, I have the script:
Code:
on *:TEXT:text:#channel: {
if ($nick == ABC) { 
msg $chan $4-
 }
}


Now, not eliminate 4 words, but removing 8 characters, what can I do?

Last edited by Ghiza; 26/09/15 03:55 PM.
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
You can use $left $right or $mid

Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
echo -at $remove(+-;test123,+-;,123)
will return test
In case you need this

Last edited by OrFeAsGr; 27/09/15 12:21 PM.
Joined: Jul 2015
Posts: 25
Q
Ameglian cow
Offline
Ameglian cow
Q
Joined: Jul 2015
Posts: 25
Originally Posted By: Loki12583
You can use $left $right or $mid


Thank you. But I do not know how to use $left $right or $mid. Its structure like?

eg someone messaging: abcd efgh ijkl mnop
and I want to reply to the content: gh ijkl mnop
automatic removal characters: abcd ef

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
/help $left
/help $right
/help $mid

Joined: Jul 2015
Posts: 25
Q
Ameglian cow
Offline
Ameglian cow
Q
Joined: Jul 2015
Posts: 25
Originally Posted By: OrFeAsGr
echo -at $remove(+-;test123,+-;,123)
will return test
In case you need this


Thank OrFeAsGr, your contribution very useful. I do not know much about the script. Please help me.

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Use: $remove identifier (/help $remove) if you read at the help file its easy to understand how-to.

e.g: $remove(TEXT,X) = TET (this it will remove the X from the TEXT text).

Otherwise paste here your FULL code to optimize it.

Last edited by westor; 28/09/15 01:36 PM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jul 2015
Posts: 25
Q
Ameglian cow
Offline
Ameglian cow
Q
Joined: Jul 2015
Posts: 25
Originally Posted By: Loki12583
/help $left
/help $right
/help $mid


Thank you Loki12583. The problem is that I need to remove a few character, not want to get a few characters

Joined: Jul 2015
Posts: 25
Q
Ameglian cow
Offline
Ameglian cow
Q
Joined: Jul 2015
Posts: 25
Originally Posted By: westor
Use: $remove identifier (/help $remove) if you read at the help file its easy to understand how-to.

e.g: $remove(TEXT,X) = TET (this it will remove the X from the TEXT text).

Otherwise paste here your FULL code to optimize it.


Thank you westor. I did refer to "$remove", but the problem is I do not want to remove "a" or "b". I want to removal 10 characters from the left.

Last edited by quanbhvn; 28/09/15 01:50 PM.
Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
onebigchunkoftext

As Loki said you can use $mid
so, $mid(onebigchunkoftext,10)
Will return koftex
Which is bigchunkoftext without the 10 first characters

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Use $left identifier if you want to take the letters from left to right.

e.g: $left(test1 test2 test3,11) = test1 test2 (it returns the first 11 characters from left to right)

/help $left


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jul 2015
Posts: 25
Q
Ameglian cow
Offline
Ameglian cow
Q
Joined: Jul 2015
Posts: 25
thanks everyone

if the return have some hidden characters, and i want remove it, what should I do?

Last edited by quanbhvn; 28/09/15 02:36 PM.
Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
What do you mean by hidden characters???

Joined: Jul 2015
Posts: 25
Q
Ameglian cow
Offline
Ameglian cow
Q
Joined: Jul 2015
Posts: 25
Originally Posted By: OrFeAsGr
What do you mean by hidden characters???


I have the challenge of a friend. He created the hidden characters. and he challenged me to remove it. He also wanted to improve me in the challenge.


Link Copied to Clipboard