Franciscotorresny 0 Posted October 16, 2016 Report Share Posted October 16, 2016 is there a way to use UI commands mix with if commands like for exampleif 2+2=4 then display this UI commands then other UI commands I have try to do it but it never displays anything. any Ideas ? Quote Link to post Share on other sites
pftg4 102 Posted October 16, 2016 Report Share Posted October 16, 2016 not with ubot ui but HTML sure I use GUI hero Darryl gives top notch support money well spent take your ui to new levels Quote Link to post Share on other sites
Franciscotorresny 0 Posted October 17, 2016 Author Report Share Posted October 17, 2016 can you help me with a link Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted October 17, 2016 Report Share Posted October 17, 2016 You need ui html command for that but it's for developers license holder only. Quote Link to post Share on other sites
Franciscotorresny 0 Posted October 17, 2016 Author Report Share Posted October 17, 2016 You need ui html command for that but it's for developers license holder only.yes .. I have developer license. Can you tell me how.. I been trying but no luck Quote Link to post Share on other sites
deliter 203 Posted October 18, 2016 Report Share Posted October 18, 2016 theres a few attributes like onClick,onChange and one or two others,example ui html panel("<div variable=\"#num\"></div>",200) if($comparison($add(2,2),"=",4)) { then { set(#num,"true","Global") } else { } } ui html panel("<button onClick=\"ubot.runScript(\'hello\')\">Say Hello</button>",200) define hello { alert("hello") } Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted October 18, 2016 Report Share Posted October 18, 2016 ive asked for conditional UI items before and would be great if they did put them in.Place the condition as a function.that gets placed into the conditional part of the UI item.if not present it shows always. else reads by the conditional statement. Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted October 18, 2016 Report Share Posted October 18, 2016 If you are looking for more simpler method you can use "ui stat monitor". Quote Link to post Share on other sites
darryl561 177 Posted October 18, 2016 Report Share Posted October 18, 2016 theres a few attributes like onClick,onChange and one or two others,example ui html panel("<div variable=\"#num\"></div>",200) if($comparison($add(2,2),"=",4)) { then { set(#num,"true","Global") } else { } } That's not really going to work for him. He stated:if 2+2=4then display this UI commandsthen other UI commands So he would need to give those ui commands a variable, which will not work inside a div that has it's own variable. I don't know why they won't do what TJ suggested. Franciscotorresny I can only think of one workaround to do this. Create 2 versions of the ui.With ui 1, include the ui commands required if 2+2=4 with ui 2, include the commands required if 2+2 does not equal 4 You can use one of pash's plugins, "Advanced Ubot 2" I think, use the UI HTML Refresh command to set the required ui. Quote Link to post Share on other sites
deliter 203 Posted October 18, 2016 Report Share Posted October 18, 2016 That's not really going to work for him. He stated:if 2+2=4then display this UI commandsthen other UI commands So he would need to give those ui commands a variable, which will not work inside a div that has it's own variable. I don't know why they won't do what TJ suggested. Franciscotorresny I can only think of one workaround to do this. Create 2 versions of the ui.With ui 1, include the ui commands required if 2+2=4 with ui 2, include the commands required if 2+2 does not equal 4 You can use one of pash's plugins, "Advanced Ubot 2" I think, use the UI HTML Refresh command to set the required ui. thanks for pointing that out,I usually use javascript to write my HTML,and it is even with that a pain to get variables back and forth,I've written a script here maybe Seth can look at it and have it fixed,this is really bad that this doesn't work for Ubot,if it was,making HTML would be easy I also know for a fact,user HaHaItsJake can write dynamic HTML with pure Ubot,Ive PM'd him for his take on this,anyways hope Ubot can make this script work properly for the Ubotters here By the way for people these are UI Commands within the myhtml variable,you can use the script I wrote on the Eval UI Method thread I posted,to get the HTML code for UI commands ui html panel(" <div id=\"container\" variable=\"#myhtml\" fillwith=\"innerhtml\"> </div> ",200) set(#myhtml,"<div class=\"uielement\">Over 18<br><input type=\"checkbox\" variable=\"#age\" fillwith=\"checked\"></div><button name=\"replacethis\" onclick=\"ubot.runScript(\'confirmAge()\')\">confirm</button>","Global") define confirmAge { if($comparison(#age,"=","true")) { then { set(#myhtml," <div>Sex<br><select ><option value=\"\"></option><option value=\"Male\">Male</option><option value=\"Female\">Female</option></select></div>","Global") } else { set(#myhtml,"<p>Sorry....You must be over 18 to proceed </p>","Global") } } } Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.