a2mateit 395 Posted January 23, 2013 Report Share Posted January 23, 2013 Hey Guys, I got a question about the ui html stat monitor. Tried searching the forum for a while but couldn't come up with an answer... What I am trying to do is this. I have a stat monitor that is updated three times. The first time it updates, it is signing up to an account. I would like the color of the font to be blue while creating an account. Next it get's updated either if successful or failed. For successful, I would like the font to be green. Red if unsuccessful. Can anybody point me in the right direction please... Ex: Stat monitor: ui stat monitor("Thread 1:", #stat_thread1) When signing up: set(#stat_thread1, "Signing up to {#url1}", "Global") Should be in blue Text in UI HTML stat monitor If successful: set(#stat_thread1, "Sign Up Successful", "Global") Should be in green Text in UI HTML stat monitor If Failed: set(#stat_thread1, "Sign-Up Failed", "Global") Should be in red Text in UI HTML stat monitor Notice the above code is for regular ui stat monitor, but I can't figure out how to do this in ui html panel. Please help me guys. Been pulling my hair out for EVER on this one.TIA,Justin Quote Link to post Share on other sites
AutomationNinja 194 Posted January 23, 2013 Report Share Posted January 23, 2013 is it just the color of the text that is giving your grief or the entire stat monitor? Could you use css and id's? or even <p style="color:red"> in the ui html panel? Quote Link to post Share on other sites
a2mateit 395 Posted January 23, 2013 Author Report Share Posted January 23, 2013 It's the color of text inside the stat monitor (i.e.- the set) needs to change based on what the variable is, as the variable is changed. Hope that makes sense... Quote Link to post Share on other sites
abbas786 78 Posted January 23, 2013 Report Share Posted January 23, 2013 set(#checking, "<font color=\"green\">Hello</font>", "Global") wait(1) set(#checking, "<font color=\"red\">Hello</font>", "Global") wait(1) set(#checking, "<font color=\"blue\">Hello</font>", "Global") wait(1) 1 Quote Link to post Share on other sites
jimbourekas@yahoo.gr 1 Posted February 10, 2013 Report Share Posted February 10, 2013 Accordingly, in the UI panel you would then have something like this: ui html panel("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\"> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> <title>your title</title> </head> <body> <div variable=\"#stat_thread1\" fillwith=\"innerhtml\"> </div> </body> </html>", 40) You have to understand that the UI Html panel is not updated automatically, you have to set the values of #stat_thread1 yourself when you want. Hope that this adds something to Abbas' help. (notice that #checking and #stat_thread1 are used the same) jimb 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.