pr0m 9 Posted December 29, 2009 Report Share Posted December 29, 2009 How can we get "return" from a sub guys? sub abc if ... ... then return 123 Quote Link to post Share on other sites
crazyflx 22 Posted December 29, 2009 Report Share Posted December 29, 2009 How can we get "return" from a sub guys? sub abc if ... ... then return 123 I'm an idiot...I posted the wrong thing before fully understanding your question. Quote Link to post Share on other sites
Aaron Nimocks 19 Posted December 29, 2009 Report Share Posted December 29, 2009 I havent found a reason to use return yet. So havent tested it. Quote Link to post Share on other sites
pr0m 9 Posted December 29, 2009 Author Report Share Posted December 29, 2009 Yeah, I know but I really want to know what's the return function for and how to use it? I want to make something like this: if run sub "abc" = 123 then do something This is why I need to get the "return" value. Thanks guys Quote Link to post Share on other sites
Aaron Nimocks 19 Posted December 29, 2009 Report Share Posted December 29, 2009 Set abc=123 If -> Evaluate (abc=123)then Quote Link to post Share on other sites
pr0m 9 Posted December 29, 2009 Author Report Share Posted December 29, 2009 Not like that. I think you misunderstanding. It's :sub abc parameter #check_string if search page $check_string then return 1 if run sub abc = 1 then run sub anothersub Quote Link to post Share on other sites
crazyflx 22 Posted December 29, 2009 Report Share Posted December 29, 2009 Not like that. I think you misunderstanding. It's :sub abc parameter #check_string if search page $check_string then return 1 if run sub abc = 1 then run sub anothersub I think I get what you're saying...I think. Here is how I would do that: :sub abc parameter #check_string if search page $check_string then set > parameter-$subabcvalue to 1 if $subabcvalue = 1 then run sub anothersub Quote Link to post Share on other sites
crazyflx 22 Posted December 29, 2009 Report Share Posted December 29, 2009 Like This: http://img189.imageshack.us/img189/5392/returny.jpg Quote Link to post Share on other sites
crazyflx 22 Posted December 29, 2009 Report Share Posted December 29, 2009 Did I just say the same thing as Aaron did? If I did, sorry about that...just trying to help. Quote Link to post Share on other sites
pr0m 9 Posted December 29, 2009 Author Report Share Posted December 29, 2009 set > parameter-$subabcvalue to 1 Thank you Crazyflx, this works better But for cleaner code, I suggest Seth & Lord implement something useful to use that "return" function correctly. Thanks guys! I'm now addicted with Ubot. I can master almost everything of Ubot now... Quote Link to post Share on other sites
Mike D 0 Posted December 29, 2009 Report Share Posted December 29, 2009 Not sure if this is what you had in mind, but you can set a variable to the $return value of a sub as in below. http://www.techrescueme.com/return.jpg Quote Link to post Share on other sites
pr0m 9 Posted December 30, 2009 Author Report Share Posted December 30, 2009 wow Thanks Mike D, I never see $return_value before lol (maybe I'm blind). This is exactly what I want. Thanks alot. Quote Link to post Share on other sites
Aaron Nimocks 19 Posted December 30, 2009 Report Share Posted December 30, 2009 wow Thanks Mike D, I never see $return_value before lol (maybe I'm blind). This is exactly what I want. Thanks alot. Damn, could of answered that question a few days ago if I knew you were just looking for the $return function. Quote Link to post Share on other sites
pr0m 9 Posted December 30, 2009 Author Report Share Posted December 30, 2009 @crazyflx: no not at all. Thanks for your help and your great contribution. I learned something from you ofcourse@Aaron: Thank you too mate. I also learned from your bot. @all: I give my best wishes to everyone. Ubot is very easy to learn, I've been playing with Ubot just in 3-4 days and today I made my own complex bot, all seperated modules & my own libraries can handle almost everything I need. Thanks everyone who gave me some very good examples, ubot sources,... If I don't have your sample bots, it will takes me much more longer to make my bot today. 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.