Jump to content
UBot Underground

Praney Behl

Fellow UBotter
  • Content Count

    2328
  • Joined

  • Last visited

  • Days Won

    94

Posts posted by Praney Behl

  1. you have to keep the .ubot file in the app. folder. Yeah I know what you are thinking, it is like giving your code away. Just change the file extension from .ubot to say .dev(Not sure if it works in Ver. 3.15, as it used to work in earlier versions) Unless the user knows what it is they wont mess out. Its risky but the only available option.

  2. Here is a quick fix to do it in existing version till someone hears you.

     

    Suppose your code that you wish to comment out is:

     

    add list to list(%sample, $list from text("C:\\Users\\name\\Desktop\\folder\\example.txt", "\\"), "Delete", "Global")
    set(#filename, $list item(%sample, $subtract($list total(%sample), 1)), "Global")
    

     

    Here is how you comment it out(temp. solution):

     

    comment("add list to list(%sample, $list from text(\"C:\\\\Users\\\\name\\\\Desktop\\\\folder\\\\example.txt\", \"\\\\\"), \"Delete\", \"Global\")
    set(#filename, $list item(%sample, $subtract($list total(%sample), 1)), \"Global\")")

     

    I.E. copy the code from the Code View and create a comment node in the Nove View and paste it there.

     

    Hope it helps.

    • Like 1
  3. If Regex is not your game then here is an easy alternative for you:

     

    Code:

    add list to list(%sample, $list from text("C:\\Users\\name\\Desktop\\folder\\example.txt", "\\"), "Delete", "Global")
    set(#filename, $list item(%sample, $subtract($list total(%sample), 1)), "Global")

     

    Hope it helps :)

    Praney

  4. Good use of Regex. Willywonka.

     

    Code in just one node:

     

    set(#clean, $find regular expression("9 Merilane
    1712 Mount Curve Avenue
    4830 N Fremont Avenue N
    5020 Blake Road
    2505 E Lake Of The Isles Parkway
    4805 Bywood Street W
    3209 Galleria Unit: 1808
    8 Park Lane
    4913 Rolling Green Parkway
    4924 Green Farms Circle
    4700 Annaway Drive
    5 Spur Road
    4218 Fremont Avenue S
    2104 Kenwood Parkway
    4612 Edgebrook Place
    14 Bello Drive
    1903 Mount Curve Avenue
    6708 Cheyenne Trail
    1324 Mount Curve Avenue
    1600 Mount Curve Avenue
    2232 W Lake Of The Isles Parkway
    7432 Shannon Drive
    72 Groveland Terrace
    31 Cooper Circle
    7333 Auto Club Road
    2544 W Lake Of The Isles Parkway
    1724 Colfax Avenue S
    301 Kenwood Parkway Unit: 401
    100 3rd Avenue S Unit: 2301
    3150 Calhoun Parkway W Unit: 503
    2516 Lake Of The Isles Parkway W
    2603 Newton Avenue S
    1715 Dupont Avenue S
    5200-32 France Avenue S
    1923 Knox Avenue S
    3742 W Calhoun Parkway
    7123 Antrim Court
    5739 Long Brake Circle
    10230 28th Avenue N
    1715 James Avenue S
    6604 Indian Hills Road
    4612 Merilane Avenue
    5800 Hidden Lane
    5901 Lee Valley Road
    1315 Mount Curve Avenue
    4602 Sunnyside Road
    6936 Valley View Road
    4256 Linden Hills Boulevard
    4402 Browndale Avenue
    5533 Brookview Avenue
    Send
    Close
    Sign Up
    Submit
    Sign In
    CLOSE", "\\d\{1,4\}.?\\d\{0,4\}\\s[a-zA-Z,0-9]\{1,30\}\\s[a-zA-Z]\{1,15\}[a-zA-Z,0-9]\{1,30\}.*"), "Global")
    

    • Like 2
  5. Did you do a V.4 version of this by any stretch of the imagination? http://ubotstudio.com/forum/public/style_emoticons/default/rolleyes.gif

     

    nm... looked at the code... even I can do that... http://ubotstudio.com/forum/public/style_emoticons/default/tongue.gif

     

    Been pretty busy lately...

    As you can see into the code its as easy as it can get ;)

  6. I don't see a need for variable for variable name. But a little away from this, a good example where variables in the name of custom commands/function can cut down a lot of code by simple using user input lets say from a drop down menu into the command/funtion 's name. This would cut down the need for using several if/else statements in comparitively large scripts.

  7. Thanks for the responses!

     

    Praney - I was setting it up again using your script, but the part I don't get is the ui text box for sample scraped item. I actually need to compare a text (it's a username) that appears on the page open in the browser at that point in the script when I'm comparing it to my #current_list. It's not like I know ahead of time what the username will be, so I don't see how I can use a UI text box.

     

    Is there a way for me to get just the script so I can post it here? I only have the standard edition. Thanks.

     

    PS. the problem isn't getting the #current_list into an actual list %current_list. This is working fine because I checked it on the debugger. The problem is comparing the scraped element to the rest of the list and telling the bot to do one activity if that element exist in my list and do another activity if it doesn't. It would be easier to post the script, but I'm not sure how to do that. I can't post the file because there is sensitive login details there that I can't share.

     

    illmill,

     

    In my earlier post I mentioned :

    "Instead of scraping an element here in this code I have added a UI text box to provide the text you are looking for in the list."

     

    As I don't know what you are scraping, so in your code all you need to do is remove this bit and replace the variable I used with the UI text Box (#sample_scraped) with your scraped element to campare with the rest of the list in the loop.

     

    and Alerts can be killed and replaced with what you need to do with it.

     

     

    Hope it helps.

     

    Praney

  8. Hmmm... yes, is it possible to use Iframes to frame an existing website inside a UI frame?

     

    I would normally use the load html command instead and have my UI Html in it. But you can either navigate to a webpage or use an Iframe, whatever fancies you.

×
×
  • Create New...