Jump to content
UBot Underground

Live Updating of UI stat monitor in ui html panel


Recommended Posts

Is this possible? Can anyone share how to do this if it is possible?

 

I have a block text area to paste a list into.

 

I would like a stat monitor to display the number of lines in the list when the list is pasted into the block text area.

 

I know this is possible with the regular ui stat monitor, but how do I get this to work with the ui html panel?

Link to post
Share on other sites

most likely you would need to add to list first before a count can be established and then sent back to the ui stat monitor as a value of items in that list that got imported

 

but it is very doable as far as i am following the path of the idea

Link to post
Share on other sites

 

Thanks WillyWonka! However I know how to do that one. That's not what I'm trying to do. I wanted the stat monitor to update when I paste the lines of text into the block text, not after I run the bot.

Link to post
Share on other sites
  • 10 months later...

Hi Guys, 

 

Just been having a mess around and this is what I came up with:

<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <style>
        #textarea {height:300px;width:300px;}
    </style>
    <body>
        <textarea id="textarea" placeholder="Paste Text Here"></textarea>
        <span id="Count"></span>
    </body>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
<script>
    $(document).ready(function(){
        $("#textarea").live("keyup mouseup change", function(){
           var text = $(this).val();
           var text = text.match(/(.*\s)/g);
           var Count = 1;
           $.each(text,function(){
               Count++;
           });
           $("#Count").text(Count);
           
        });
    });
</script>
</html>

There are probably better ways to do it, but it works!

 

Carl  ;)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...