Jump to content
UBot Underground

UBotDev

Fellow UBotter
  • Content Count

    1360
  • Joined

  • Last visited

  • Days Won

    65

Everything posted by UBotDev

  1. Well, everything you need to do is loop through table columns and rows and prepare the data string similar to this one: var data = google.visualization.arrayToDataTable([ [\'Year\', \'Sales\', \'Expenses\'], [\'2004\', 1000, 400], [\'2005\', 1170, 460], [\'2006\', 660, 1120], [\'2007\', 1030, 540] ]); Once you have that string you simply pass it to JavaScript used for charting, and execute to draw the chart...
  2. Obviously you shouldn't use stop command, because that stops the main thread and consequentially also sub-threads. Instead you should add some code (conditions) that will skip all the code and go to the end of code that's inside a "thread" container. That way only that specific thread will close.
  3. Yes, you could use regular expression for that. Here are the replacements you need to make: http://dev.mysql.com/doc/refman/5.0/en/string-literals.html#character-escape-sequences
  4. You should pass #row to your $scrapeFunction, not a list %idScraped, right?
  5. You are loosing some data that way....you could also escape that special character...
  6. Great to hear you got it. Thanks TJ for contribution; I will consider adding those features as part of next release, I just think I'll try to "aggregate" some of those.
  7. I don't think you understand...as I said, you should use custom format specifiers instead of using a a value from the dropdown. I'll quote the paragraph form my website for you here: As said in previous post, you can find more info about custom format specifiers here: http://ubotdev.com/free-plugin-datetime-manipualtion#custom-format-specifiers
  8. You can get any format by using custom format specifiers: http://ubotdev.com/free-plugin-datetime-manipualtion#custom-format-specifiers If you'll have any problems let me know.
  9. Could be. I'm not using it so I was wondering the same.
  10. As I said, you need to increment #row outside the thread, not inside. Beside that you need another define command around the part where you spawn a new thread, in order for this to work . Here is an example, with your code stripped down with some code added: clear list(%rows) define $scrapeFunction(#row) { return(#row) } set(#row, 0, "Global") loop(10) { THREAD START(#row) increment(#row) wait(0.5) } define THREAD START(#row) { thread { add item to list(%rows, $scrapeFunction(#row), "Delete", "Global") wait(1) } } Here is a bit more advanced exampl
  11. Same here, I don't think UBot email commands are enough to build any decent, email related automation software around them. I already had to reject a project because of that, since I just can't guarantee that it will work, since we have no way to track success/errors.
  12. Just add it to "Parameters" when defining your function, so it looks like this: define $scrapeFunction(#row) { } Also make sure to check wiki: http://wiki.ubotstudio.com/wiki/Define
  13. By quickly checking the code I see 2 problems: First you need to move code "increment(#row)" out from "$scrapeFunction()", because you want to process the 2nd row as soon as 1st thread is started, therefor you need to execute increment right after the 1st thread is started, and not after a few other commands are executed. Second you need to pass #row into "$scrapeFunction()" as parameter, to ensure that it doesn't change in that scope (inside that function/thread). PS: High speed threading is also broken as proved here: http://www.ubotstudio.com/forum/index.php?/topic/15122-must-read-threa
  14. You should have a variable which will hold your list position, and increment it manually when you want to go to next list item. Then you just pass that value to "$list item" to retrieve a specific item...
  15. What error do you get in v4? Also it would be much easier to help you if you would share your code and page you are working on...
  16. Thanks for another great plugin TJ.
  17. I don't think that's doable....1ms corresponds to a frequency of 1kHz, but your monitor is only able to refresh at rate of around 50-60Hz...as you can see the frequency of your monitor is much lower than what you are trying to display, so you actually wouldn't saw all the changes if you update at that rate. From the frequency of your monitor you can calculate what the max rate is; for 60Hz it's for example 16,67ms (this is the min. increment that you would be able to spot). You should also keep in mind that your eye only catches changes which happen around 25Hz. Else I was already adding a s
  18. Hm...not sure what you mean... It confuses me because I see "Records Collected" number in the video, which I can't relate to time. Isn't that just a counter? This new function is mostly meant to be used with UNIX timestamps...for example when you subtract one from another you get a time difference in seconds, which you can then convert with this new function to a more human-readable format - "time span".
  19. The problem is that regex you've found is used for input validation, that's why it has trailing ^ and ending $ and it doesn't work for your case. If you remove those 2 characters the regex will work for scraping as you want.
  20. I've released version 1.1 today, which includes a new function called "$datetime time span", which will convert an integer to a time span; more info here: http://ubotdev.com/free-plugin-datetime-manipualtion#update-v101
  21. I've just updated the plugin today and added the feature you needed, so every command (function don't have it) now has an option to "Wait For Exist": http://ubotdev.com/free-plugin-advanced-shell#update-v101 You should already have a download link in your email.
  22. I think the best would be if you would use "in new browser" command, and open the page you are clicking inside there...that way you keep your main page open... Else you can always use javascript to get you back on previous page: run javascript("history.back();")
  23. In your place I would try with UBot v4, I think this is v5 problem! Btw, while developing you should have errors enabled, although there is an option to disable them (although I wouldn't suggest you disable them)... However, in your compiled bots errors are ignored, and bot skips to next line/commands Yeah, I think UBot would really need some kind of exception handling....currently you instead need to rely on success signs, which doesn't work in all cases....
  24. The problem is that you don't wait enough time for the page to load, so your code finishes while the page is sill loading. You need to start using "wait for element" command to ensure that the page has enough time to load, and you need to use that every time you are reload the page (click and navigate commands). Additionally, to make your application "robust" you should also use if($exists(XXX)) statements to confirm that the page was loaded, if it's not, you could thrown an error (alert) or something...
×
×
  • Create New...