Jump to content
UBot Underground

Data Types / Scraped Number Seems To Be Text Only


Recommended Posts

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!

Link to post
Share on other sites

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.  :rolleyes: learning curve

Link to post
Share on other sites

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.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...