Chromatic

Chromatic

Joined
Jun 28, 2013
Website

Threads

Chromatic   -  Nov 19, 2013

Hey guys -- Anyone have a good snippet to limit the output to X lines or Y characters? IE: Anything that exceeds X character/words/lines is cut off.

The purpose is to limit scripts in a chat channel from outputting too much data,.. ie: Using say Wolframalpha some searches are quite short in their resulting output,.. but some searches (not intended to spam) can output 25 lines or more of text spamming the channel.

Any code to paste in the scripts I need to limit the output would be appreciated -- or even just a link to a snippet/code already on here that has the code in it to limit output so I can dig it out myself would be fine.

Appreciate any help.

Chromatic   -  Nov 04, 2013

How would you remove a file extension from a variable that had a file stored in it.

I've used
%variablename = $left(%variablename, -4)

And this works for most files.. but a few files it starts removing the last 4 characters before the . -- So it starts cutting off 4 characters of the part of the filename I want.

For example if the file were the movie Braveheart.mp4 -- Sometimes it would show Braveh

On most instances it will show just Braveheart

This may be due to VLC or something, but a work around / different way / or check would be immensely helpful.

Goal is to say take Braveheart.mp4 and have it store in a variable as just Braveheart.

Not sure why the method of code I am using on some files pulls more than just the .xxx file extension.

So, just curious if there were another way to go about it that would eliminate the "sometimes" removal of more than just the file extension of video files.

Thanks.

Chromatic   -  Oct 19, 2013

Looking for a News Bot/Script for IRC. This will be used in a Chatroom, so it needs to pull from a website (perhaps several) , and be very lean and concise/short. IE: Top news story for the area should be a few lines from the bot. -- Would like to be able to do something like !news us (to pull top US story of the hour).. !news uk (To pull top UK story of the hour),.. and bonus would be to add Canada, Australia (all the major english speaking areas).

Anyone interested in this? -- I've seen one news bot on here, it's old and pulls from reuters, reuters web site has changed... Thanks

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.