Jump to content
UBot Underground

[GET] Collapse all nodes automatically


Recommended Posts

Since ubot devs looks like have no plan on implementing this. Here's a workaround on how to collapse all nodes when you open your bot.

ui stat monitor("", "<script type=\"text/javascript\">
    window.setTimeout(function() \{ ubot.runScript(\'collapseAllNodes()\') \}, 500)
</script>")
define collapseAllNodes {
    set(#botTitle, "testing", "Global")
    divider
    plugin command("WindowsCommands.dll", "set active window", "{#botTitle}* - UBot Studio Developer Edition", "")
    plugin command("WindowsCommands.dll", "keyboard event", "Alt", "Key Down")
    plugin command("WindowsCommands.dll", "type keys", "{#botTitle}* - UBot Studio Developer Edition", "", 381, 151, "e+collapse all")
    plugin command("WindowsCommands.dll", "keyboard event", "Alt", "Key Up")
}

What this does is simulate the clicking of "Edit>Collapse all nodes" of your bot.

 

Instructions:

- Edit the #botTitle variable with your bot name. It is case sensitive.

- If you're using uiHtml Copy the javascript code on the ui stat monitor and paste it inside the head of your html.

 

I used this javascript onload instead of ubot onload because ubot onload command triggered immediately when you open your bot that will make your bot to hang for a few seconds. More info about this js onload http://www.ubotstudio.com/forum/index.php?/topic/10747-get-onload-feature/

 

Download file: collapseNode.ubot

 

K

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