Jump to content
UBot Underground

J Bot

Fellow UBotter
  • Content Count

    23
  • Joined

  • Last visited

Everything posted by J Bot

  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.
  16. Looks like you are basically trying to emulate a UI stat monitor? In a UI Html, I beleive you need to do that in a DIV as follows: <div variable="#letter" fillwith="innertext">Status</div><br/>I don't think you can do that in a textarea unless perhaps you used javascript.
  17. It doesn't have to be a useless thread. You could post how you did it so that someone else can find the answer here in the future.
  18. Hey, thanks for the reply. I really being able to come here and get the opinions of people have been around the block a few times.
  19. especially when you know it's a fairly easy question that someone knows the answer to and you get an answer in 13 minutes.... Nice..... It seems I am not so fortunate. My most recent question currently has 21 views and now replies after 10 hours. sigh....
  20. I am working on a fairly straight forward bot that will scrape google results. I have several methods in mind that could get to a results page in the browser and wonder which would be best. My intent is to sell this bot. I'm only scraping the titles and URLS, not going into results. The search query itself is fairly complex (long). I had to trim the original down as google has a 32 word limit on queries. I want to run the queries specifically against a fixed # of sites using the site: operator in google, so.. run the query multiple times. I want Google search settings to include 'Sa
  21. When considering a tool for creating UI HTML Panels for Ubot, didn't look any further than the powerful looking IDE that John uses in his LearnUbot.com videos. It looks to be Microsoft's SharePoint Designer 2007 which is, by the way, FREE and very powerful. Though it doesn't create the cleanest CSS code on it's own (your style's end up being inline) it is user friendly enough. All your standard HTML and CSS tags are built into the IDE. You type an open '<' and the IDE offers a dropdown with all of your possible html tags in it. Say you pic div from the drop down list and hit space,
×
×
  • Create New...