whole word search
 
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Snippet Requests
 
ircaoc@peru.com  -  Mon May 28, 2012 10:05 pm Reply with quote
on *:open:?:*:{
if (hi iswm $1-) {
.msg $nick yes is hi
}
else {
.msg $nick is not hi
}
in private.. this happens

Quote

user: high
me: yes is hi


I would like this to happen

Quote

user: bla bla high bla bla
me: is not hi

Quote

user: text text hi text text
me: yes is hi


would only respond if the word hi is complete
hello a question .. you may find whole word only
sorry for my English .. thank you very much again for the quick help
MoMy  -  Tue May 29, 2012 5:22 am Reply with quote
Hi,
If I have not misunderstood.

If private message (pm or pvt), I suggest you use on text event.
example:
If someone in your pm write hi, the code respond nickname yes is hi

Code

 
Jethro  -  Tue May 29, 2012 8:06 am Reply with quote
Use regex instead...

Code

 


MoMy, $istok() is a good choice, but if someone says it with a punctuation mark placed behind it as such:

Quote

Hi, there
the code won't respond. (Or in similar fashion with a period or exclamation mark.)

Better yet, regex's /S modifier will strip control code if his or her text is set with color code imbedded. This prevents the the trigger word from not responding.
Display posts from previous:   
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Snippet Requests All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.