Jump to content
UBot Underground

Html Table Output Not Allowing Highlight In Browser Window?


Recommended Posts

I have created a bot that outputs a table to HTML in the browser window, but the table won't allow me to highlight when double or triple clicking any text area. Is this a bug within ubot, or am I doing something wrong?

 

Table Code:

___NODEVIEWCOPY___1___NODEVIEWCOPY___
<tr>
    <th>First Name</th>
    <th>Last Name</th>
    <th>User Name</th>
  </tr>
<tr>
<td>___NODEVIEWCOPY___2___NODEVIEWCOPY___</td>
<td>___NODEVIEWCOPY___3___NODEVIEWCOPY___</td>
<td>___NODEVIEWCOPY___4___NODEVIEWCOPY___</td>
</tr>
    <th colspan="3" style="width:100%">Password</th>
<tr>
<td colspan="3" style="width:100%">___NODEVIEWCOPY___5___NODEVIEWCOPY______NODEVIEWCOPY___6___NODEVIEWCOPY___</td>
</tr>
<tr>
    <th>Zip Code</th>
    <th>City</th>
    <th>State</th>
</tr>
<td>___NODEVIEWCOPY___7___NODEVIEWCOPY___</td>
<td>___NODEVIEWCOPY___8___NODEVIEWCOPY___</td>
<td>___NODEVIEWCOPY___9___NODEVIEWCOPY___</td>
</tr>
<tr>
    <th>Birth Date</th>
    <th>Birth Month</th>
    <th>Birth Year</th>
  </tr>
  <td>___NODEVIEWCOPY___10___NODEVIEWCOPY___</td>
  <td>___NODEVIEWCOPY___11___NODEVIEWCOPY___</td>
  <td>___NODEVIEWCOPY___12___NODEVIEWCOPY___</td>
  </tr>

Any help is greatly appreciated, thanks!

Link to post
Share on other sites

this will turn the td red when you dounble click on them,you need an internet connection as it gets the jquery library

load html("<table id=\"customers\">
  <tbody><tr>
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
    <td>Maria Anders</td>
    <td>Germany</td>
  </tr>
  <tr>
    <td>Centro comercial Moctezuma</td>
    <td>Francisco Chang</td>
    <td>Mexico</td>
  </tr>
  <tr>
    <td>Ernst Handel</td>
    <td>Roland Mendel</td>
    <td>Austria</td>
  </tr>
  <tr>
    <td>Island Trading</td>
    <td>Helen Bennett</td>
    <td>UK</td>
  </tr>
  <tr>
    <td>Laughing Bacchus Winecellars</td>
    <td>Yoshi Tannamuri</td>
    <td>Canada</td>
  </tr>
  <tr>
    <td>Magazzini Alimentari Riuniti</td>
    <td>Giovanni Rovelli</td>
    <td>Italy</td>
  </tr>
</tbody></table>

<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js\"></script>
<script>
$( \"tr td\" ).dblclick(function() \{

 
this.style.backgroundColor=\"red\";
\});</script>")

  • Like 1
Link to post
Share on other sites

here is a second script,this exposes the table to easy ubot manipulation,whichever cell is double clicked,it gives the cell an id of "myButtonClick"

and runs a ubot define,where you can customize how ubot works with the table,see this example,double click a cell it turns red,double click again and it goes back to normal,using all ubot code

load html("<table id=\"customers\">
  <tbody><tr>
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
    <td>Maria Anders</td>
    <td>Germany</td>
  </tr>
  <tr>
    <td>Centro comercial Moctezuma</td>
    <td>Francisco Chang</td>
    <td>Mexico</td>
  </tr>
  <tr>
    <td>Ernst Handel</td>
    <td>Roland Mendel</td>
    <td>Austria</td>
  </tr>
  <tr>
    <td>Island Trading</td>
    <td>Helen Bennett</td>
    <td>UK</td>
  </tr>
  <tr>
    <td>Laughing Bacchus Winecellars</td>
    <td>Yoshi Tannamuri</td>
    <td>Canada</td>
  </tr>
  <tr>
    <td>Magazzini Alimentari Riuniti</td>
    <td>Giovanni Rovelli</td>
    <td>Italy</td>
  </tr>
</tbody></table>

<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js\"></script>

<script>
$(document).ready(function()\{
  $( \"tr td\" ).dblclick(function() \{
  try\{
    
    
  $(\"#myButtonClick\").removeAttr( \"id\" )
    
    this.id=\"myButtonClick\"
  ubot.runScript(\"cellClicked()\")
  \}
  
  catch(err)\{\}

\});
\})
</script>")
define cellClicked {
    alert($scrape attribute(<id="myButtonClick">, "innertext"))
    if($comparison($scrape attribute(<id="myButtonClick">, "style"), "=", "background-color:red;")) {
        then {
            change attribute(<id="myButtonClick">, "style", "")
        }
        else {
            change attribute(<id="myButtonClick">, "style", "background-color:red;")
        }
    }
}

  • Like 1
Link to post
Share on other sites

no you cant copy from the table comfortably at all,copying from text on that browser just doesnt work well,you dont need internet if you download jquery and put it their instead of getting jquery

 

You can get the jquery by going to the link in the script ajaa.google copy and paste all of it,and paste it in <script>Paste here</script> and remove that script src line below,just be sure to do it above the bit of script i have at the end

 

I suggest,modify the script I done above,and have it Save to clipboard on click

 

theres a free plugin somewhere called advanced file I think that has copy to clipboard

 

this is ready to go by the way,just add the script at the bottom,to the bottom of your html and should work fine,and of course have the ubot define too

load html("<table id=\"customers\">
  <tbody><tr>
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
    <td>Maria Anders</td>
    <td>Germany</td>
  </tr>
  <tr>
    <td>Centro comercial Moctezuma</td>
    <td>Francisco Chang</td>
    <td>Mexico</td>
  </tr>
  <tr>
    <td>Ernst Handel</td>
    <td>Roland Mendel</td>
    <td>Austria</td>
  </tr>
  <tr>
    <td>Island Trading</td>
    <td>Helen Bennett</td>
    <td>UK</td>
  </tr>
  <tr>
    <td>Laughing Bacchus Winecellars</td>
    <td>Yoshi Tannamuri</td>
    <td>Canada</td>
  </tr>
  <tr>
    <td>Magazzini Alimentari Riuniti</td>
    <td>Giovanni Rovelli</td>
    <td>Italy</td>
  </tr>
</tbody></table>

<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js\"></script>

<script>
$(document).ready(function()\{
  $( \"tr td\" ).dblclick(function() \{
  try\{
    
    
  $(\"#myButtonClick\").removeAttr( \"id\" )
    
    this.id=\"myButtonClick\"
  ubot.runScript(\"cellClicked()\")
  \}
  
  catch(err)\{\}

\});
\})
</script>")
define cellClicked {
    plugin command("Advanced.File.dll", "Save to Clipboard", $scrape attribute(<id="myButtonClick">,"innertext"))
}

  • Like 1
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...