James J 3 Posted July 14, 2012 Report Share Posted July 14, 2012 I am trying to create a proxy/ip settings UI HTML WINDOW that worked perfectly ina v3.5 bot with v4 Problem One... When I choose a selection from the list box in the UI HTML WINDOW then run the script the variableis NOT being set Problem Two... When I use a set node (which is inside define command) to set the location of the input file it still shows "No file chosen" in my UI HTML WINDOW. Any help would be greatly appreciated ;-) James ui html window("Proxy / IP Address Setting", "<html> <head> <meta content=\"text/html; charset=ISO-8859-1\" http-equiv=\"content-type\"> <link rel=\"stylesheet\" type=\"text/css\" href=\"form.css\" media=\"print\"> <script type=\"text/javascript\" src=\"custom-form-elements.js\"></script> <style> body \{ background: #e2e2e2; /* Old browsers */ background: -moz-linear-gradient(top, #e2e2e2 0%, #e2e2e2 8%, #f2f2f2 29%, #f2f2f2 99%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e2e2e2), color-stop(8%,#e2e2e2), color-stop(29%,#f2f2f2), color-stop(99%,#f2f2f2)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, #e2e2e2 0%,#e2e2e2 8%,#f2f2f2 29%,#f2f2f2 99%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, #e2e2e2 0%,#e2e2e2 8%,#f2f2f2 29%,#f2f2f2 99%); /* Opera11.10+ */ background: -ms-linear-gradient(top, #e2e2e2 0%,#e2e2e2 8%,#f2f2f2 29%,#f2f2f2 99%); /* IE10+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#E2E2E2\', endColorstr=\'#F2F2F2\',GradientType=0 ); /* IE6-9 */ background: linear-gradient(top, #e2e2e2 0%,#e2e2e2 8%,#f2f2f2 29%,#f2f2f2 99%); /* W3C */ \} </style> <title></title> </head> <body topmargin=\"10\" rightmargin=\"10\" leftmargin=\"10\" bottommargin=\"10\"> <center> <table style=\"text-align: left; width: 500px; color: rgb(102, 102, 102); font-family: Arial; font-weight: bold;\" border=\"0\" cellpadding=\"5\" cellspacing=\"10\"> <tbody> <tr> <td style=\"vertical-align: top;\"> <div style=\"text-align: right;\"> </div> <div style=\"text-align: center;\"> <div style=\"text-align: right;\"> </div> <table style=\"text-align: left; width: 500px; margin-left: auto; margin-right: auto; background-color: rgb(102, 102, 102);\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\"> <tbody> <tr> <td style=\"vertical-align: top; width: 500px; text-align: center; font-family: Arial;\"> <div style=\"text-align: center;\"><big style=\"color: white;\"><span style=\"font-family: Arial; font-weight: bold;\">IP Address / Proxy Manager </span></big><big><span style=\"font-family: Arial; font-weight: bold; color: rgb(102, 102, 102);\"></span></big></div> </td> </tr> </tbody> </table> <small><span style=\"font-weight: bold;\"></span></small><small><span style=\"font-weight: normal;\"><span style=\"font-weight: bold;\"><br> Proxy Settings Details...<br> <br> </span></span></small></div> <center> <table style=\"text-align: left; font-family: Times New Roman,Times,serif; width: 420px;\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tbody> <tr> <td style=\"vertical-align: top; font-family: Arial; width: 150px; color: rgb(102, 102, 102); font-weight: bold; text-align: left;\"><small><span style=\"font-weight: normal;\"><span style=\"font-weight: bold;\"></span>Set Proxy Type:</span><br> </small> <select variable=\"#ProxySelection\" name=\"ProxySelection\" id=\"ProxySelection\" size=\"6\" fillwith=\"value\" value=\"\"> <option>Use Proxies</option> <option>Use Private Proxies</option> <option>No Proxies</option> </select> <small> </small></td> <td style=\"vertical-align: top; font-family: Arial; width: 250px; color: rgb(102, 102, 102); font-weight: bold; text-align: center;\"> <div style=\"text-align: left;\"><small><span style=\"font-weight: normal;\">Proxies File:</span></small><br> <input style=\"font-weight: normal;\" variable=\"#ProxyFile\" name=\"ProxyFile\" id=\"ProxyFile\" type=\"file\"> <small><span style=\"font-weight: normal;\">Private Proxies Username:</span></small><br style=\"font-weight: normal;\"> <input variable=\"#ProxyCredentialsUserName\" name=\"ProxyCredentialsUserName\" id=\"ProxyCredentialsUserName\" fillwith=\"value\" size=\"30\" value=\"\"><br style=\"font-weight: normal;\"> <small><span style=\"font-weight: normal;\">Private Proxies Password:</span></small><br style=\"font-weight: normal;\"> <input variable=\"#ProxyCredentialsPassword\" name=\"ProxyCredentialsPassword\" id=\"ProxyCredentialsPassword\" fillwith=\"value\" size=\"30\" value=\"\"><br style=\"font-weight: normal;\"> <br> </div> </td> </tr> </tbody> </table> <small style=\"font-style: italic; color: rgb(102, 102, 102); font-weight: bold;\"><span style=\"font-weight: normal;\"><br> NOTE: - Once you set up proxies the application will save/continue<br> to use these settings each time you run the application until they are <br> changed above. After you start the robot (press the play button) <br> your currently saved settings will be displayed below...</span></small><br> <br> <table style=\"text-align: left; width: 100%; margin-left: auto; margin-right: auto; background-color: rgb(218, 218, 218);\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\"> <tbody> <tr> <td style=\"vertical-align: top; width: 3%; text-align: left;\"><small style=\"font-weight: bold; color: rgb(102, 102, 102);\"><span style=\"font-weight: normal;\">Type:</span></small><br> </td> <td style=\"vertical-align: top; text-align: left; width: 95%;\"> <div style=\"text-align: left;\"> </div> <div style=\"padding: 2px; width: 450px; font-weight: normal; font-size: 12px; font-style: italic; color: rgb(153, 153, 153); text-align: left;\" variable=\"#ProxySelectionMonitor\" name=\"ProxySelectionMonitor\" id=\"ProxySelectionMonitor\" fillwith=\"innertext\">Waiting...</div> </td> </tr> </tbody> </table> <table style=\"text-align: left; width: 100%; margin-left: auto; margin-right: auto; background-color: rgb(218, 218, 218);\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\"> <tbody> <tr> <td style=\"vertical-align: top; width: 7%; text-align: left;\"><small style=\"font-weight: bold; color: rgb(102, 102, 102);\"><span style=\"font-weight: normal;\">File:</span></small></td> <td style=\"vertical-align: top; text-align: left; width: 95%;\"> <div style=\"padding: 2px; width: 450px; font-weight: normal; font-size: 12px; font-style: italic; color: rgb(153, 153, 153); text-align: left;\" variable=\"#ProxyFileMonitor\" name=\"ProxyFileMonitor\" id=\"ProxyFileMonitor\" fillwith=\"innertext\">Waiting...<br> </div> </td> </tr> </tbody> </table> </center> </td> </tr> </tbody> </table> <p><br> </p> <br style=\"font-family: Arial;\"> <br style=\"font-family: Arial;\"> </center> </body> </html>", 650, 550) Contact Users Set Proxy Variables() divider define Contact Users Set Up Proxies { if("") { then { } else { } } if($both($comparison(#Contact Users BuidProxyList, "=", $true), $either($comparison($read file("{$special folder("My Documents")}\\YouTube\\Proxies\\1.txt"), "=", "Use Private Proxies"), $comparison($read file("{$special folder("My Documents")}\\YouTube\\Proxies\\1.txt"), "=", "Use Proxies")))) { then { clear list(%Contact Users Proxies) add list to list(%Contact Users Proxies, $list from file($read file("{$special folder("My Documents")}\\YouTube\\Proxies\\2.txt")), "Delete", "Global") if($comparison($read file("{$special folder("My Documents")}\\YouTube\\Proxies\\1.txt"), "=", "Use Private Proxies")) { then { set proxy credentials($read file("{$special folder("My Documents")}\\YouTube\\Proxies\\3.txt"), $read file("{$special folder("My Documents")}\\YouTube\\Proxies\\4.txt")) } else { } } set(#Contact Users BuidProxyList, $nothing, "Global") } else { } } if($either($comparison($read file("{$special folder("My Documents")}\\YouTube\\Proxies\\1.txt"), "=", "Use Private Proxies"), $comparison($read file("{$special folder("My Documents")}\\YouTube\\Proxies\\1.txt"), "=", "Use Proxies"))) { then { change proxy($next list item(%Contact Users Proxies)) if($comparison($list position(%Contact Users Proxies), ">=", $list total(%Contact Users Proxies))) { then { set list position(%Contact Users Proxies, 0) change proxy($list item(%Contact Users Proxies, 0)) } else { } } set(#Contact Users GoodProxy, $nothing, "Global") if($either($comparison($read file("{$special folder("My Documents")}\\YouTube\\Proxies\\1.txt"), "=", "Use Private Proxies"), $comparison($read file("{$special folder("My Documents")}\\YouTube\\Proxies\\1.txt"), "=", "Use Proxies"))) { then { in new browser { set visibility("Invisible") loop while($comparison(#Contact Users GoodProxy, "=", $nothing)) { divider navigate("http://www.youtube.com", "Wait") if($search page("YouTube, LLC")) { then { set(#Contact Users YouTubeGoodProxy, $true, "Global") } else { set(#Contact Users YouTubeGoodProxy, $nothing, "Global") } } divider navigate("http://www.yahoo.com/", "Wait") wait for browser event("Page Loaded", 30) if($search page("Yahoo! Inc.")) { then { set(#Contact Users YahooGoodProxy, $true, "Global") } else { set(#Contact Users YahooGoodProxy, $nothing, "Global") } } divider if($both($comparison(#Contact Users YouTubeGoodProxy, "=", $true), $comparison(#Contact Users YahooGoodProxy, "=", $true))) { then { set(#Contact Users GoodProxy, $true, "Global") } else { set(#Contact Users GoodProxy, $nothing, "Global") } } } set visibility("Visible") } } else { } } } else { change proxy("None") } } navigate("http://autotrafficempires.com/initializing/getip.php", "Wait") wait(2) } define Contact Users Set Proxy Variables { set(#ProxySelection, "Use Proxies", "Global") set(#ProxyFile, "Waiting...", "Global") set(#ProxyCredentialsUserName, "Waiting...", "Global") set(#ProxyCredentialsPassword, "Waiting...", "Global") set(#ProxySelectionMonitor, "Test...", "Global") set(#ProxyFileMonitor, "Test...", "Global") } Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 14, 2012 Report Share Posted July 14, 2012 The problem with list box in a ui html window is that you must select click on another ui elements after it has been selected, otherwise the variable is not set. This is a bug. I got around this by using a drop down instead. This should help to also solve problem 2 that your having now that the drop down has been selected it knows what to run. 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.