Jump to content
UBot Underground

Recommended Posts

Hello, and thank you in advance! 

 

I want to create a dropdown menu that will have 3 options to run 3 different scripts. How is this possible?

 

I made 3 different loops but I can't figure out how to connect them to the drop down menu I made.

 

Thanks! 

Link to post
Share on other sites

Here you go: 

ui drop down("Select Script", "Script One,Script Two,Script Three", #Script_Selection)
ui button("Start") {
    if($comparison(#Script_Selection, "=", "Script One")) {
        then {
            Script One()
        }
        else if($comparison(#Script_Selection, "=", "Script Two")) {
            Script Two()
        }
        else if($comparison(#Script_Selection, "=", "Script Three")) {
            Script Three()
        }
    }
}
define Script One {
    alert("Script One Running!")
}
define Script Two {
    alert("Script Two Running!")
}
define Script Three {
    alert("Script Three Running!")
}

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...