Capital Letter and a full-stop

By zexx0r on Feb 11, 2009

well, some of the guys that I know just love typing in a "proper" way,
so they would type with the first capital letter and the full-stop at the end,
and so I thought it would be interesting to make life easier :P

#cl on

on *:input:#: {
  if ($left($1,1) == /) { return }
  if ($istok(? ! .,$right($1-,1),32)) { haltdef | msg $chan $upper($left($1,1)) $+ $right($1-,-1) }
  else { haltdef | msg $chan $upper($left($1,1)) $+ $right($1-,-1) $+ $chr(46) }
}

#cl end

menu * {
  .CLP [capital letter - point]
  ..on:enable #cl
  ..off:disable #cl
}

Comments

Sign in to comment.
cofvempire   -  Sep 15, 2010

ok got it working but now i see when i typ this => :) ; it says :).
otherwise good script just that little thing thats bugging me :p :D
so how could that be fixed or not :)

 Respond  
cofvempire   -  Sep 13, 2010

yeah i have that (the inputthing for other things) ok no problem then :D

 Respond  
Lucius   -  Sep 13, 2010

You have another talk script running.

something else that uses

on *:INPUT:*: {
Aimless Arrow  -  Mar 03, 2014

Is there a way to bypass it without deleting the other scripts?

Lucius  -  Mar 04, 2014

3 and a half years is past my recollection point. You'll have to fully explain what you mean to me.

Sign in to comment

cofvempire   -  Sep 13, 2010

doesnt work for me

when i type this:
test

i get this in the channel:
test
Test.

whats wrong then?

 Respond  
Eugenio   -  Feb 15, 2009

rofl @ dan
smh
most codes like this have the exact same errors, but dan is a lost cause when it comes to punctuation anyhow, online or not!
;p

 Respond  
Jethro   -  Feb 14, 2009

It's a nifty script to automatically capitalize the first word of a sentence and insert a period at the end. But it would be better if it could recognize a question phrase and put a question mark at the end, instead of a period.

Let's say if you typed a simple word why and didn't put a question mark, the script would put a period there, which would not be a good thing.

What, do, did, how, why, where, when, who, can, could, should and might are the common ones to start a question phrase. They are the words to watch out for. This also applies to the exclamation mark.

 Respond  
Prelude   -  Feb 14, 2009

''Proper'' typing on the internet?..does that even exist, anyways not to bad for one of your first snipps. Suggest you take Scakks suggestion learn from it as well, looks useful though so 7/10.

 Respond  
Scakk   -  Feb 11, 2009

Here you go.

on *:input:#: {
  if ($left($1,1) == /) { return }
  if ($istok(? ! .,$right($1-,1),32)) { haltdef | msg $chan $upper($left($1,1)) $+ $right($1-,-1) }
  else { haltdef | msg $chan $upper($left($1,1)) $+ $right($1-,-1) $+ $chr(46) }
}
 Respond  
Scakk   -  Feb 11, 2009

I typed --> testing this out.
It gave --> Testing this out.. <-- two periods

I typed --> testing this out!
It gave --> Testing this out!. <-- exclimation point & period

I typed --> testing ? this out
It gave --> Testing ? this out <-- no period

 Respond  
zexx0r   -  Feb 11, 2009

it's been primarily made for simple sentences, but ok :)

 Respond  
Scakk   -  Feb 11, 2009
elseif (? isin $1-) { haltdef | msg $chan $upper($left($1,1)) $+ $right($1-,-1) }

Above does not add a period to the end and it allows the questionmark to be anywhere in the sentence(s).

else { haltdef | msg $chan $upper($left($1,1)) $+ $right($1-,-1) $+ $chr(46) }

Above allows you to have double period at the end ( .. ) or an exclimation point and then a period ( !. )

 Respond  
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.