some_guy 11 Posted February 25, 2010 Report Share Posted February 25, 2010 iglow, I will try and knock something up for you tonight. Got some bots I need to get finished as they have been dragging for 2 weeks now and I keep getting distracted by tangents (like captchas). If I don't post anything, please send me a PM reminding me as I tend to forget Quote Link to post Share on other sites
some_guy 11 Posted February 25, 2010 Report Share Posted February 25, 2010 Ok, have attached a bot that contains a sub that returns true or false (1 or 0) if a string (the haystack) contains another string (needle). Have included the run sub call and an alert to display what the sub returns true or false. Should be straight forward to modify it to work it into your bot, if you're having trouble though, just gimme a shout.contains_bot.ubot 1 Quote Link to post Share on other sites
iglow 8 Posted February 27, 2010 Report Share Posted February 27, 2010 thanx a lot! Quote Link to post Share on other sites
tooltrainer 12 Posted March 18, 2010 Report Share Posted March 18, 2010 hey some_guy, got a question for you... I need exactly what your bot does for a bot I'm working on, but for reasons I can't figure out it works great in your bot, but not in mine. Same exact code only change being that I'm substituting a page scrape as #haystack and of course a different #needle. I wanted to use the library originally in this thread but I couldn't get that to work either. I have no idea why it works perfectly in your file, but once I paste it into mine it won't work at all. I just get "error" returned every time instead of 0 or 1. Any ideas what I should be looking for? Thanks! Jonathan Quote Link to post Share on other sites
tooltrainer 12 Posted March 18, 2010 Report Share Posted March 18, 2010 OK WTF?!?!??! This is nuts. I've now deleted EVERYTHING from my bot, and pasted in ONLY what you created in your contains_bot, modified with my small changes. This is exactly what works perfectly in your file, and it still will not work in mine. The two are (visually) IDENTICAL! Every node is exactly the same. How could it work in one and not the other?? Can you say frustrated?!?! Jonathan Quote Link to post Share on other sites
tooltrainer 12 Posted March 18, 2010 Report Share Posted March 18, 2010 Holy crap I solved it. This is a UBot bug for sure. When copying nodes from one bot to another, if the first script calls subs in "this one", those get messed up when they paste into the other bot, even though they still say "this one" they appear to have some link back to the previous bot, and so error out. By recreating the identical run sub with the identical parameters IN the second bot, it works fine. Seth? Jonathan Quote Link to post Share on other sites
alcr 135 Posted March 19, 2010 Report Share Posted March 19, 2010 ...did you hit refresh? You gotta hit refresh. Quote Link to post Share on other sites
some_guy 11 Posted March 25, 2010 Report Share Posted March 25, 2010 Holy crap I solved it. This is a UBot bug for sure. When copying nodes from one bot to another, if the first script calls subs in "this one", those get messed up when they paste into the other bot, even though they still say "this one" they appear to have some link back to the previous bot, and so error out. By recreating the identical run sub with the identical parameters IN the second bot, it works fine. Seth? Jonathan Hi, sorry for not replying have been out of action last couple of weeks. I've had issue with copying nodes, especially subs and if changing the text in the name. As Alc hitting refresh should help, I also used to do something else which would mean it always worked, but can't remember what as am abit ubot rusty. If I remember I shall post it here Quote Link to post Share on other sites
dyigu 1 Posted April 27, 2010 Report Share Posted April 27, 2010 is this working now with the new version? Quote Link to post Share on other sites
alcr 135 Posted April 27, 2010 Report Share Posted April 27, 2010 is this working now with the new version?Should work. Quote Link to post Share on other sites
Net66 54 Posted April 30, 2010 Report Share Posted April 30, 2010 Thanks for this Jim - was very useful in a bot I had to put together today. Andy Quote Link to post Share on other sites
Praney Behl 314 Posted July 30, 2010 Report Share Posted July 30, 2010 That is a very useful add-on to the already powerful Ubot Studio. I am quite a curious creature and like experimenting a lot, I am curious to know if it is possible to use any other languages, maybe say VB, or C#, as UBot Studio is based on the .Net Framework. If not, is there a way to use these languages along with UBot Studio, that will be an awesome thing to do and will make UBot, in my opinion 1 of the most powerful dev. tool out there. I really wanna use few .net functions along side wiu Ubot. Cheers! Praney Quote Link to post Share on other sites
Bot-Factory 602 Posted August 25, 2010 Report Share Posted August 25, 2010 Hi. Would be great if there would be a function to extract the first paragraph from an article. Example: I have a text file with an article (500 words, 5 paragraphs) I use that to fill a text box. But there is another text box I have to fill. Called "Article Summary". Normally that's the first paragraph of the original article. Currently I struggle to extract that from my original article. Would be really great if the strings function could help here? Thanks in advanceDan Quote Link to post Share on other sites
DjProg 3 Posted September 27, 2010 Report Share Posted September 27, 2010 WARNING : At the time of this writing two functions don't work, and can't work. The following functions : substring and substring alt will not work as they are not returning the "eval" of the javascript , so they simply return what has been concatenated within ubot and not the result of the javascript expression. Example : NOT GOOD : GOOD : I also changed the " into ' but I don't know if it makes any difference... not a javascript expert, just trying to make this thing work I don't know how to do it but if someone could correct the original ubot file posted by the OP it could help some people like me from getting "koukou" Quote Link to post Share on other sites
Wisdom4U 0 Posted September 28, 2010 Report Share Posted September 28, 2010 I was considering how best to remove certain lines from a list (like those with more than 3 "/") and came across this library post.so if I wanted to keep: http://www.drakesomething.com/ but remove http://www.insiderpages.com/s/TX/Dallas/Jewelers?radius=0 (it has more than 3 "/")would I need the library, would it be helpful, is way without the library? Steve Quote Link to post Share on other sites
rudy 0 Posted December 23, 2010 Report Share Posted December 23, 2010 Why is this stickied? It is full of errors. Wasted hours on this. The "find" sub does not work because "indexOf" is written as "indexof" and the substring also do not work at all 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.