sandyego 1 Posted June 5, 2018 Report Share Posted June 5, 2018 Hello everyone, This is my first topic here, and I am working on the first bot I will ever have built. I have a task management software at my job that I am automating due to the fact that all of the tasks in the software are repetitive. There are tasks in different places so the first function I am working on after login is reading the number of tasks in the primary task list. The idea is that if the number of tasks in the primary list is 0 the bot will simply query the page every five minutes or so until a task pops up. From code view, this is what I have: if($eval($scrape attribute(<class="leadDiv">,"innertext") > 0)) { then { click(<class="leadDiv">,"Left Click","No") } else { }} So I'm trying to make a function that scrapes the numerical value from the task list and evaluate to see if that number is greater than 0. When I try to run the node I get an error message "Conversion from type 'UList' to type 'String' is not valid." I think its an error of data types, but I'm not sure how datatypes are set in Ubot. Any input is greatly appreciated! Quote Link to post Share on other sites
sandyego 1 Posted June 5, 2018 Author Report Share Posted June 5, 2018 Ok I got it figured out. For anyone curious I scraped the task value into a variable, and used the variable for math purposes. Viola! it worked. learning curve Quote Link to post Share on other sites
HelloInsomnia 1103 Posted June 5, 2018 Report Share Posted June 5, 2018 I think its an error of data types, but I'm not sure how datatypes are set in Ubot. Glad to hear you got it working, regarding this statement data types are set automatically. Basically everything is treated as a string unless its a number of some sort then it's treated like a number when you compare it or increment/decrement it. 1 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.