Jump to content
UBot Underground

J Bot

Fellow UBotter
  • Content Count

    23
  • Joined

  • Last visited

Community Reputation

5 Neutral

About J Bot

  • Rank
    Member

Profile Information

  • Gender
    Male

System Specs

  • OS
    Windows 8
  • Total Memory
    More Than 9Gb
  • Framework
    v3.5 & v4.0
  • License
    Developer Edition

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. As you mentioned... threads could cause issues.... and if you are dealing with large files, or slow connections, you may well want to do the save in a thread to allow the rest of the bot to 'carry on'. To ensure that any file dependent functions don't error out because the file save isn't complete, you could use the following: loop while($not($file exists("{$special folder("Application")}\\content.txt"))) { wait(.2) } adjusting the wait time as you see fit.
  2. Your question isn't quite clear to me. Not sure how you get a list of names 'set up to a button' In UBot, multiple items are usually stored in lists or tables. To process them one at a time, you use a Loop command. To find out how many items are in a list, you use the $List Total command. $list total is often used in the top of the loop to tell it how many times to repeat. (once fore each item in the list) If you have items already in a list, and you just want it's total, you can't just drag $list total into your script. You have to drag it into a command which will accept its value lik
  3. In Dev version, I often just edit html in code view. Out of curiosity, I placed <!-- comment --> (an html comment) in a non html portion of my bot and then switched to node view to see if it would show up. (wouldn't that be nice) It did not show up (no big surprise there) Neither did any of the original code that had been 'below' the comment. Everything after the bogus html comment was gone.... Even in code view. I am curious, but not dumb, so I just closed without saving... no harm done. Just thought I'd share though in case any of you other cats out there get any unrealisti
  4. just to make sure we're on the same page..... http://www.screencast.com/t/tIMNrdEYA
  5. You should be able to modify that regex by simply adding additional options in the parentheses, eg. (hours|day|mins) not certain that nesting works, but you could try it to make the code more flexible.... Edit: tested \d\{1,2}\s(min|hour|day|week|month)(\s|s\s)ago this one should return both singular and plural.
  6. While grabbing the whole page is easier, I prefer to find the highest level element I HAVE to scrape in order to capture everything I want. In this case that is a DIV class="s" -- then I run my regex against that. The issue is that the nesting structure of the resulting html is inconsistent. BOTH instances... (with our without an image) contain the DIV class="f slp" The only thing I found to be consistent was the format of the resulting string you are looking for "nn hours ago" With a 24 hour search, I did have to allow for Google returning "1 day ago" so.... Here ya go. navigate("https
  7. Not sure what the benefit of the windows shortcut file is... you can just use the batch file with your exe. My batchfile contains a single line and works just fine. "C:\Users\John\Documents\Guild Wars\helloworld.exe" /autopause I put it in my GW directory just to match your structure which had a space in the path. If you know that your batch file will be in the same directory as your .exe, you can just use the following format. .\helloworld.exe /auto or, if your exe name has spaces in it.... ".\hello world.exe" /auto
  8. yes, what he wrote would need to be used in a ui html panel.
  9. If you have an aversion to text files, or if you find you would need numerous text files, you could use the sqlite plugin and just create a database to pull pre-defined constants from. Within an sqlite db, you can create multiple tables instead of having multiple text files.
  10. Can this be used to refresh the UI HTML panel? For example if I add a new item to a dynamic dropdown?
  11. That was helpful for something I was trying to do. Having trouble with it though... #dropdownoptions doesn't update when I pick an item from the dropdown. Do I need javascript or something to set it?
  12. It's pretty easy to stop a While loop though. You can do it by putting a checkbox in the UI and checking it's state. If you check it the while loop stops. i prefer using while's when I can for just this reason. The following uses a checkbox to set the #StopLoop variable. If I check the checkbox, the script stops on the next loop. define RunLoop { set(#Counter, 0, "Global") loop while($comparison(#StopLoop, "!=", $true)) { wait(3) increment(#Counter) } alert("You allowed this loop to run {#Counter} times before you stopped it.") } If you do need to use
  13. Just a comment / clarification on darryl's note here. This pertains to the ui html panel and ui html window commands as well as the browser command, load html. I like to use notepad ++ (free text editor) to edit my html code. You can cut and paste back and forth from a text editor and the Node View html objects in UBot without issue. No extra \'s are inserted. However -- If you copy out of Node View to your text editor, make some changes and paste it back, make sure you paste it back in Node View. Pasting it in Code View will break your bot. On the other side of the coin, pulling h
  14. Comparing code I had written to the google 'search result scrape' in the bot bank and wonder if my code is better or worse (less robust?) and why. Any comments would be appreciated as I'm still learning (arent' we all?) Bot Bank on Setting Time Frame: clicking through the 'visible' items wait for element(<innertext="Search tools">, "", "Appear") click(<innertext="Search tools">, "Left Click", "No") wait for element($element offset(<class="mn-dwn-arw">, 1), "", "Appear") click($element offset(<class="mn-dwn-arw">, 1), "Left Click", "No") wait for el
  15. Yeah.. Debugger helps. I like to temporarily add ALL my vars to a UI Stat Monitor while I'm building. It helps reduce those little forehead smacking moments.
×
×
  • Create New...