View Single Post
  #7  
Old 03-10-2012, 12:16 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
This is how I did it in the Client RC (copied/pasted directly out of the script):

PHP Code:
    // Changed this so RC will scroll back to 
    // normal position. -Tig
    
    // Store the old position before adding text
    
temp.oldpos ScriptedRCScroll.scrollpos;
    
    
// Need to get the position of scroll when it's
    // at the bottom
    
ScriptedRCScroll.scrollToBottom();
    
temp.maxscroll ScriptedRCScroll.scrollpos[1];
    
    
ScriptedRCRCchat.text @= "\n" temp.data;
        
    
// If the scroll wasn't at the bottom, then don't
    // scroll to back to the bottom.
    
if (temp.oldpos[1] != temp.maxscroll) {
      
ScriptedRCScroll.scrollTo(temp.oldpos[0], temp.oldpos[1]);
    } else {
      
ScriptedRCScroll.scrollToBottom();
    }
    
    
// Check to see if the text is bigger than the scroll
    // viewing window, if not, scrolltobottom.
    // Makes sure it will move the scroll down to the bottom
    // if there was previously no scroll showing.
    
if (ScriptedRCRCchat.clientheight ScriptedRCScroll.clientheight ScriptedRCRCchat.profile.getTextHeight()) {
      
ScriptedRCScroll.scrollToBottom();
    } 
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote