Top

Sentence ender/capitalization


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  5.1 (of 7 scores)
Date Added  Sep 20, 2007
Last Updated  Sep 20, 2007
Tags  capitalization  end  sentence  text  word 

Introduction

a simple code for lazy people like me ;) to edit which presets you would like to have on or off; go to the var %tmp and replace the first on/off with the choice you decide to enable/disable the period ender and the second on/off to enable/disable the captialization at the beginning of each sentence. to disable/enable the entire snippet, a simple menu will do that work for you.

Grab the Code

#sent.comp on
on *:INPUT:*:{ 
  var %tmp = on,on
  if ($left($1-,1) !iswm /) && ($active !iswm Status Window) { 
  msg $active $+($iif($gettok(%tmp,2,44) = on,$+($upper($left($1,1)),$right($1-,-1)),$1-),$iif($gettok(%tmp,1,44) = on,$chr(46),$chr(32))) }
  halt 
}
#sent.comp end
 
menu channel { 
  Sentence completer: 
  .Current status $iif($group(#sent.comp).status iswm On, On, Off): 
  ..On/Off:$iif($group(#sent.comp).status iswm on, disable #sent.comp, enable #sent.comp)
}
 

Comments

  (24)  RSS
SilentExile
Comments: 19
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 20, 2007 4:08 pm
Not a bad little snippet here. If I had the ability to: 4.5/10.
mountaindew
Comments: 1,826
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 20, 2007 4:19 pm
dude that is a good idea, i love it!
mountaindew
Comments: 1,826
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 20, 2007 4:24 pm
but it doesnt work for me

it says theres a problem with the $iif
mountaindew
Comments: 1,826
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 20, 2007 5:04 pm
Code:

on *:INPUT:*:{
  var %x = .!
  if ($left($1-,1) != / && $active != Status Window && $left($1-,1) islower && $right($1-,1) !isin %x) {
    msg $active $upper($left($1-,1)) $+ $right($1-,$calc($len($1-) - 1)) $+ . | haltdef
  }
}


that works, but idk whats wrong with the menu
token
Comments: 24
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 20, 2007 5:36 pm
@ SilentExile, thank you

@ mountaindew, could you specify which line in the script? everything worked fine for me so I have no clue why there would be an error.
mountaindew
Comments: 1,826
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 20, 2007 5:38 pm
hmm...it may be another script of mine then

but you had a lot of unnecessary code in the on input, and you didnt even have a period ender like u said
token
Comments: 24
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 20, 2007 5:42 pm
.. yes it should.. $chr(46) returns a period. i hope i explained everything clearly here is how it's supposed to work:

the %tmp variable returns two values sperated by a comma. the first value returns whether to end the sentence with a period, the second value returns whether to start the sentence with a capital letter. if you pasted the script exactly as it is now, then everything should be on. i think i am going to edit this a bit, because i think i see what you are talking about mountaindew. when you type the sentence, does it start with a capital without the capital letter option on?
token
Comments: 24
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 20, 2007 5:47 pm
i found an error. i think what was happening was that the actual snippet only worked if the first letter was lower cased, thus if you chose to not start with a capital letter it wouldn't work unless you manually typed it. i've fixed that problem and removed some useless code. it should be a bit cleaner now. thanks mountaindew for your assistance. =)
mountaindew
Comments: 1,826
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 20, 2007 5:53 pm
yea the $iif thing wasnt from ur script

now it works fine, with capital and period :P
token
Comments: 24
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 20, 2007 5:57 pm
glad to hear it =)
TropicalMeltdown
Comments: 72
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Jul 22, 2008 5:35 pm
Hey man it be cool if you could put colors for punc. and Cap letter and stuff
TropicalMeltdown
Comments: 72
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 7, 2008 3:54 pm
4 real add colors
Akishoot
Comments: 139
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 7, 2008 4:17 pm
Useful to me since later in the evenings I get pretty lazy, and its a great idea. :)

7/10
TropicalMeltdown
Comments: 72
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 20, 2008 8:04 pm
still no colors
Imrac
Comments: 21
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 20, 2008 11:07 pm
Code:
#sent.comp on
on *:INPUT:*:{ if (/* !iswm $1-) && ($active != Status Window) { msg $active $regsubex($regsubex($1-,/^((?:\x03\d{0,2}(?:,\d{0,2})?|\x02|\x1f|\x22)*(?:[a-z]))/, $upper(\t)), /([^.?!])$/, \t $+ $chr(46)) | halt } }
#sent.comp end

menu channel,status,query {
  Sentance Completer
  .$iif($group(#sent.comp).status  == on, Disable, Enable) : $iif($group(#sent.comp).status  == on, .disable #sent.comp, .enable #sent.comp)
}


My version of it, handles colors, punctuation at the end, updated menu
TropicalMeltdown
Comments: 72
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 21, 2008 9:51 am
YU ROCK IMRAC
TropicalMeltdown
Comments: 72
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 21, 2008 9:53 am
no colors dude
TropicalMeltdown
Comments: 72
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 21, 2008 9:53 am
Put Some colors dude
napa182
Comments: 1,454
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 21, 2008 1:18 pm
TropicalMeltdown
use the damn edit buttton ffs.. damn flooder.. and if you want color's then add them ur self.
Eugenio
Comments: 1,193
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 21, 2008 1:25 pm
rofl
Bullet_Dodger
Comments: 310
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 26, 2008 12:47 pm
[6:47pm] <~Bullet_Dodger> Testing script
[6:47pm] <~Bullet_Dodger> Testing script.
[6:47pm] <~Bullet_Dodger> Testing script
[6:47pm] <~Bullet_Dodger> Testing script.
[6:47pm] <~Bullet_Dodger> Testing script
[6:47pm] <~Bullet_Dodger> Testing script.

^ Err it repeats everything twice
Akishoot
Comments: 139
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 26, 2008 12:51 pm
Bullet_Dodger: Check to make sure you do not have two 'on *:INPUT' scripts going at once.
Bullet_Dodger
Comments: 310
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Sep 26, 2008 12:54 pm
Oh yea forgot about that.
Kirby
Comments: 475
 
mIRC Snippet:  Sentence ender/capitalization
Posted on Dec 21, 2008 11:28 pm
This looks like a code from quite a while ago.
Anyways, tested and liked it.
Turns out quite useful for people I talk to who communicate like:
Quote:
<Simkana> too late hun
<Simkana> nor is yur muimummu


/me rates 8.0

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom