IceChat Forums

IceChat 7 => IceChat 7 Scripts => Topic started by: Cerulean on August 27, 2008, 04:33:37 PM

Title: Split Message Script
Post by: Cerulean on August 27, 2008, 04:33:37 PM
Does anyone happen to have a script that will allow a very long post in chat to continue into a second post instead of just being cut off? For example, if you type a paragraph or so in a chat room it just cuts at a certain point when you post it. Some IRCs have the ability to allow the part of the post that got cut off to continue on the next line. I hope that made sense. heh

Any help would be greatly appreciated. Thank you.
Title: Re: Split Message Script
Post by: Snerf on August 27, 2008, 04:46:51 PM
Just set the 'SizeLimit=' line to how many characters you want it to split at.
Save it as an IceChat 5 (*.ice) style script.

Code: [Select]
Dim SizeLimit
SizeLimit=150

Function OUTTEXT(OutgoingText)
if Len(OutGoingText) > SizeLimit then
    do     
        msg = left(OutGoingText,SizeLimit)
        SendCommand msg
        OutGoingText = mid(OutGoingText,SizeLimit+1)
    loop while Len(OutGoingText) > 0   
else
    OUTTEXT = OutGoingText
end if
End Function
Title: Re: Split Message Script
Post by: Cerulean on August 28, 2008, 04:04:35 AM
Thank you very much. I really appreciate the help. Now I just need to read up on how to add this. heh (Sorry if I seem noobish. I'm new to Ice Chat. Been using Pirch for years but a few weeks ago it just stopped working and I can't figure out why. Just freezes when I click the login button.) Anyway, Ice Chat is the best IRC I've found since then so I'll be sticking with it. Thanks again.

C.
Title: Re: Split Message Script
Post by: DarkStar on January 30, 2009, 10:45:48 AM
I've modified this script some, to split at the last space if possible, thus to preserve words / links.

Code: [Select]
Dim SizeLimit
SizeLimit=350

Function OUTTEXT(OutgoingText)
if Len(OutGoingText) > SizeLimit then
    do     
        search = left(OutgoingText,SizeLimit)
        if len(OutgoingText) > sizelimit and instr(search, " ") then
          splitpos = instrrev(search, " ")
          Msg = left(OutgoingText, splitpos)
          OutgoingText = Mid(OutgoingText,splitpos+1)
        else
          msg = left(OutgoingText, sizelimit)
          OutgoingText = mid(OutgoingText, sizelimit+1)
        end if
    SendCommand msg
    loop while len(OutgoingText) > 0
else
    OUTTEXT = OutGoingText
end if
End Function
Title: Re: Split Message Script
Post by: Sally Abravanel on August 30, 2010, 02:19:28 AM
Thank you, both!