Jump to content
UBot Underground

VaultBoss

Fellow UBotter
  • Content Count

    790
  • Joined

  • Last visited

  • Days Won

    34

Everything posted by VaultBoss

  1. This is simple to do, although requires two extra lists than the original: clear list(%mylist_A) add list to list(%mylist_A, $list from text("1,2,3,4,5,6,7,8,9,10", ","), "Delete", "Global") clear list(%mylist_ add list to list(%mylist_B, $list from text("2,3,4,5,6,7,8,9,10,11", ","), "Delete", "Global") clear list(%mylist_C) add list to list(%mylist_C, $subtract lists(%mylist_A, %mylist_, "Delete", "Global") clear list(%mylist_D) add list to list(%mylist_D, $subtract lists(%mylist_B, %mylist_A), "Delete", "Global") add list to list(%mylist_C, %mylist_D, "Delete", "Global") ...but it k
  2. To pass a parameter to a batch file, you need to call the batch file with the parameter value at the end of the command, separated by a space from the .bat file name itself. From within your ubot, like this: shell("CMD.exe /C \"\"C:\\Program Files\\MyAwesomeBAT.bat\" \"{#var_Variable_Parameter_To_Pass_To_Bat_File}\"") Inside your .bat file, the passed value is accessed with %1 To pass 2 variables, separate them with a space in the command line and get the second variable's value in the .bat file with %2 ... and so forth... Notice that you HAVE to enclose the command you pass to SHE
  3. You're most welcome! If you liked it, you can thank me by hitting the LIKE THIS button on the bottom-right corner of the post... Cheers!
  4. You might want to watch this first .. looks like people are already cracking it: http://www.google.com/search?q=crack+net+seal I believe any such licensing system - that becomes popular quickly - gets a following of crackers and hackers that will break it. Best way, IMHO... code your own system, and use it only for your own software. Assuming you won't sell hundreds/thousands units, you'd be safe - these guys won't bother cracking it probably, especially if it is not very easy (you know what you're doing).
  5. I'm testing your script now - there was an error at runtime, "value cannot be null" (or some such...) that I bypassed with a manual continue, so... you may want to make your code error-proof by employing some error checking IF THEN ELSE mechanisms... It worked well but I'm using OO Calc not Excel to view the file, and it asks me at import what separator to use (so I tick comma) Probably you have Excel setup to open .csv by default w/o import options... or/and you don't have default options set to separate with comma. In any case, the script is ok, it's just your Excel that messes up the
  6. It looks as if your Excel doesn't recognize the file as a .csv file. What happens if you load the previously saved file back into UBot, as a table. Does it show right in debugger?
  7. From what you describe there, I am pretty sure you are making this mistake, that many people do, even myself sometimes, when not paying attention to all the details: You don't really have two lists! You have built or scraped some data into 2 different text variables. Your data 'looks like' a list, in that of it has a long text with your elements interwoven with commas; however, THAT structure is not a list, UBot Studio - wise... You should make sure it is a list before you can use the commands you want for tables. Because they are just simple text variables, when you try to add them as d
  8. In code or node view, when you place your variable between curly brackets, you basically instruct UBot to replace the variable name with its STRING content in the code line at runtime. As long as that is what you are looking to do, it won't really matter if it has curly brackets or not later in viewing, as long as it contains some text... However, IF you are looking for the variable name to be LITERALLY present per se (I don't know why you would, let's say you did) then you would need to escape the characters, probably, to preserve it looking that way, because the UBot Studio code interpret
  9. You want to have variables created dynamically. I want that too, for various reasons... (more or less obvious to UBot Studio dev team who seems to have dismissed the idea) It is is not currently possible... unfortunately!
  10. Sure, just replace the part that loads the list from disk with the scraping you want done. Make sure to save the scraped results into the list. If you scrape attribute, it's directly done, but if you scrape table, then you would still have to save to disk and reload into a list (the simplest and quickest way) or else, to loop through the table instead of the list and apply a similar code, just this time you will have table cells, not list items...
  11. BTW... I keep telling people on various forums... when you like someone's help/contribution, expressing it is always very much appreciated (Thank you!) but hitting the LIKE THIS button of the post you liked helps a lot too...
  12. Yep, would complicate things, as you would have no control when that would happen, so you should re-calculate the max list length in each loop again and again, not just once... Easiest way to do that would be to add the end resulting list (after being built with no dupe removal) to itself, WITH dupe removal in one single step.
  13. My bad, I wrote the code too quickly and didn't notice it first. Change the line that removes the already trimmed list element into this: remove from list(%lst_Loaded_from_File, $list position(%lst_Loaded_from_File)) Also, note that IF you add the modified element to a new list rather than at the end of the same list, you will have to either: delete (from the code) the removing from the initial list command, or else you will scan only half the list then get an error of exceeding list length or, alternatively, along with removing it, shorten the max looping counter to address the new
  14. Don't just paste the file location there directly in CODE View if you don't know exactly how to escape characters, but rather navigate to your file in Node View, so that UBot automatically adds the correct file path in the command. Probably, your path now looks something like... D:\My Documents\UBots Bots\myfile.txt When in fact, in CODE View mode, should rather look like: D:\\My Documents\\UBots Bots\\myfile.txt
  15. The code above also deletes the processed list items when finished, followed by adding them at the end of the same list. Basically, this way you will get the list properly trimmed after looping it all. You can then save it to disk or whatever... However, if you want to keep the original list intact, you need to edit the code and: delete the REMOVE FROM LIST command there as well as edit the ADD ITEM TO LIST command which now instead of adding the element to the same list should add to a new list that you will name accordingly... say: %lst_List_Trimmed (or anything you like better) Cheers
  16. This is the simple code to trim your list down to max 80 chars for each element: add list to list(%lst_Loaded_from_File, $list from file("REPLACE-WITH-YOUR-FILE-PATH-HERE"), "Delete", "Global") set(#var_CYC_List_Loop_Counter, 0, "Global") set(#var_CYC_List_Total_Elements, $list total(%lst_Loaded_from_File), "Global") loop while($comparison(#var_CYC_List_Loop_Counter, "<", #var_CYC_List_Total_Elements)) { set(#var_CRT_Current_List_Item, $list item(%lst_Loaded_from_File, #var_CYC_List_Loop_Counter), "Global") set(#var_CRT_Current_List_Item, $trim(#var_CRT_Current_List_Item), "Global
  17. Yes, of course... why wouldn't it? It is perfectly possible. Of course, the code needs to be a bit altered, as now it accepts some content as a separator, while you are seeking positioning directly, but it is very easy to do it, np...
  18. They are the input variables that are passed into the DEFINE from the main program that is calling it...
  19. Beware, when you program it, apart from selecting it to be a 'Function' not a 'Command' in the DEFINE node, you will also have to add an extra command at the end, specifically the RETURN command, that will instruct the function WHAT exactly to return when called... Inside the RETURN command you will set the 'Local' variable (from within the DEFINE code) that will be passed outside, to the calling program: RETURN(#Rounded_Value) ....for example.
  20. When you set the custom command to function, the resulting function may be called and would actually return the result per se, not just perform the set of commands within, like the regular commands would do. For instance, if you would write some code to get some data from a variable as its input, then perform a set of operations/calculations within, math or string related, for example... then calling that function would actually pass the result of the operations to a set command on the main program. Like this - say you write a define to calculate the Round number of a decimal number, that
  21. Yeah, that's what I thought... Good luck with it now!
×
×
  • Create New...