Luke 18 Posted September 21, 2011 Report Share Posted September 21, 2011 In v3 it was very easy to select text on a page with a #var as part of your expression, like this: http://screencast.com/t/0GZp6odQ But now in v4 I'm just not getting results when I do the nearest approximation. Here's what I'm trying: http://screencast.com/t/sD7lHxi3U In v3 I could just use the text stored in the variable to make up any part of the expression by placing a {1} where I wanted it. But now in v4 if I try to name my variable there (I used #Niche in the example) or even drag the variable for #Niche over into the expression using "Innertext" for it to replace, the node never clicks successfully. I've tried Innerhtml too, same results. & Yes, I've made very sure that the contents of #Niche match exactly what's on the page to be clicked on. Thanks in advance,Luke Quote Link to post Share on other sites
Eddie Waller 158 Posted September 22, 2011 Report Share Posted September 22, 2011 If you want to type in the variable name inside quotes you'll have to use { and } around it such as <value="Click {#this variable}"> If you just want the attribute to equal a variable, you can use: <value=#variable> If you just type in the variable name inside the quotes it tries to match the actual variable name. Here's an example that works for me on Google: http://screencast.com/t/ccTha4TQh set(#var, "I\'m Feeling Lucky", "Global") click(<value=#var>, "Left Click", "No") Quote Link to post Share on other sites
Luke 18 Posted September 22, 2011 Author Report Share Posted September 22, 2011 D'oh! No Quotes on Variables! Arghh... That fixed it. There are some really big mindset changes I feel like must be easier for the true coders here to get their heads around that doesn't come to naturally for those of us who "learned to code" through earlier versions of uBot... This is a perfect example of something I never would have figured out, possibly because I never want to look at the code under code view and see if there is an extra or missing pair of quotes where I'm working... Are there going to be more films in the future on the changes between old-style ubotting and v4 ubotting? Thanks again! Quote Link to post Share on other sites
Eddie Waller 158 Posted September 22, 2011 Report Share Posted September 22, 2011 Here's a more visual way to get to the same result. We'll definitely have more videos in the future to help explain these concepts. You should be able to drop it between the quotes but it looks like there's a bug now that doesn't let you do that. http://screencast.com/t/Hq3xQECZ Quote Link to post Share on other sites
Luke 18 Posted September 22, 2011 Author Report Share Posted September 22, 2011 Yep, I was doing that (with click, not type text actually) but I just didn't know to delete the Quotes too. Oh well, Live and learn. I'm going to try to use the code view to look for things out of place more now too. Thanks again, I'll look forward to the vids. Quote Link to post Share on other sites
UBotDev 276 Posted September 22, 2011 Report Share Posted September 22, 2011 Hm...it doesnt work for me, while one with "http://test.com/" works. http://screencast.com/t/yVPt0DVEewif("") { then { click(<href="http://test.com/">, "Left Click", "No") } else { } } click(<href=#Google Domain Footprint>, "Left Click", "No") I also have some problems with using variables in "Execute" - js function. EDIT: Is it possible that it started to work after switching to Code View and Back to node? EDIT: Still, hex_md5(\"test\"+{#Date}) does not work for me. 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.