tooltrainer 12 Posted January 17, 2010 Report Share Posted January 17, 2010 This seems like it should be so simple but for some reason it's not working. I need to do this: if#var is emptydo something I've tried doing an eval for $nothing but it doesn't work. I also can't have it eval for an empty string, because UBot always puts ( ) in the string if it's blank. What am I doing wrong here? Thanks, Jonathan Quote Link to post Share on other sites
tooltrainer 12 Posted January 17, 2010 Author Report Share Posted January 17, 2010 OK it won't even evaluate if I actually set the value to a hyphen and test for that. What's going on here? Gonna try quitting & relaunching next. Jonathan Quote Link to post Share on other sites
Aaron Nimocks 19 Posted January 17, 2010 Report Share Posted January 17, 2010 Im 90% sure I always us ifvariable = $nothing and it works for me. Quote Link to post Share on other sites
tooltrainer 12 Posted January 17, 2010 Author Report Share Posted January 17, 2010 OK this gets stranger... it works fine when and ONLY when the value I'm testing for is the first item in the list. Subsequent items, even though they are identical, fail to evaluate. So if I have it evaluating a list for #var being equal to a hyphen, if the first value is a hyphen then that one will work. But the next value could be a hyphen as well, and it won't evaluate even though the value is in fact a hyphen and I can use it as I would expect in any other way. What gives? Jonathan Quote Link to post Share on other sites
tooltrainer 12 Posted January 17, 2010 Author Report Share Posted January 17, 2010 WTF... I swear I'm losing my mind. What's actually happening is UBot is jumping right over items in a loop. No idea why! The loop in question is attached. Take a look at it... UBot executes the js alert properly on the first loop, and after that it blows right past it skipping both the alert and the IF logic completely and moving right on past them. WHat on earth is going on here? Jonathan Quote Link to post Share on other sites
tooltrainer 12 Posted January 18, 2010 Author Report Share Posted January 18, 2010 This is driving me absolutely bonkers... does anyone have a clue what could be happening? Is it some really stupid user error that I'm just completely blind to? I'm losin it. Jonathan Quote Link to post Share on other sites
tooltrainer 12 Posted January 19, 2010 Author Report Share Posted January 19, 2010 Wow does nobody have any idea what's going on here? Maybe this is actually a bug? If so it's pretty nasty and needs fixing... Anyone?? Jonathan Quote Link to post Share on other sites
alcr 135 Posted January 19, 2010 Report Share Posted January 19, 2010 Let me alert Seth about it -- because I have no idea, haha. Quote Link to post Share on other sites
webautomationlab 21 Posted January 19, 2010 Report Share Posted January 19, 2010 TT, try Set> #hyphen>> - Then do the eval of #current_title against #hyphen Quote Link to post Share on other sites
tooltrainer 12 Posted January 19, 2010 Author Report Share Posted January 19, 2010 Thanks that's worth a try... but the issue actually isn't the comparison, it's the fact that UBot is completely skipping over entire nodes on the loop. They work on the first pass, and then they ignore it completely. Seems like a bug but I'm hoping I'm wrong... Jonathan Quote Link to post Share on other sites
tooltrainer 12 Posted January 19, 2010 Author Report Share Posted January 19, 2010 More info.. the problem is in the run javascript node. If I have it display an alert consisting of a variable, it only works on the first pass of the loop. But if I set it to display an alert consisting of a string, it loops just fine every time. More and more this is feeling like a bug. Jonathan Quote Link to post Share on other sites
Seth Turin 223 Posted January 19, 2010 Report Share Posted January 19, 2010 More info.. the problem is in the run javascript node. If I have it display an alert consisting of a variable, it only works on the first pass of the loop. But if I set it to display an alert consisting of a string, it loops just fine every time. More and more this is feeling like a bug. Jonathancan you send me the bot? Quote Link to post Share on other sites
tooltrainer 12 Posted January 19, 2010 Author Report Share Posted January 19, 2010 Sure, here it is attached, stripped down to the bare essentials. Just put some items in the list box and run it. It SHOULD pop an alert with each item in it in a loop, but it only pops for the first item. Jonathanbad_bot.ubot Quote Link to post Share on other sites
tooltrainer 12 Posted January 20, 2010 Author Report Share Posted January 20, 2010 Hey Seth, anything on this one yet? Thanks! Jonathan Quote Link to post Share on other sites
tooltrainer 12 Posted January 21, 2010 Author Report Share Posted January 21, 2010 This is killing me... still nothing? Jonathan Quote Link to post Share on other sites
Seth Turin 223 Posted January 21, 2010 Report Share Posted January 21, 2010 hey sorry. I've been looking at this and I figured out what the problem is... sort of. when list from text splits up the text, for some reason it's keeping a line break at the beginning of every line but the first. what that means is that when it tried the javascript, it ends up looking something like this: alert('line2'); which doesn't make sense to the browser. I'll have to do some more head scratching to come up with an elegant solution to the problem, but its on my list and I'll do everything I can to include it in the next update (which I promise will happen in the next few days. sorry guys, been busy with the affiliate system!) Quote Link to post Share on other sites
tooltrainer 12 Posted January 21, 2010 Author Report Share Posted January 21, 2010 Aha! OK so at least it's a confirmed bug and I'm not just completely losing my mind. LOL OK I'll be patient... for the time being I have a semi-solution cooked up in strict PHP but the UBot solution would be a bit more elegant. Thanks Seth! Jonathan 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.