ladygaming 1 Posted February 20, 2012 Report Share Posted February 20, 2012 1) Load text file myitems.txt 2) Myitems.txt has these items gibberish5237015dsfasar325725153gjaeryuae5672552ajyer9a764792t53238470234787023435802735082735070esar7670ae6t902723649sdfshfrlgh23y932679325235232875028735802632837502635073252 3) I need them seperated into 8 lines at a time extras just on the buttom gibberish5237015dsfasar325725153gjaeryuae5672552ajyer9a764792t53238470234787023435802735082735070esar7670ae6t902723649sdfshfrlgh 23y932679325235232875028735802632837502635073252 4) save back to myitems2.txt How would i accomplish this? please help thanks! Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted February 20, 2012 Report Share Posted February 20, 2012 This should work Just copy these codes on code view. clear list(%list) clear list(%list2) add list to list(%list, $list from text("gibberish5237015 dsfasar325725153 gjaeryuae5672552 ajyer9a764792t53 2384702347870234 3580273508273507 0esar7670ae6t902 723649sdfshfrlghea 23y9326793252352dsad 3287502873580263d 2837502635073252 gibberish5237015d3 dsfasar325725153423 gjaeryuae56725527 ajyer9a764792t5377 23847023478702347 35802735082735077 0esar7670ae6t90275 723649sdfshfrlgh657 23y932679325235275 3287502873580263765 28375026350732527 gibberish5237015765 dsfasar32572515357 gjaeryuae56725527765 2384702347870234765 3580273508273507756 0esar7670ae6t9029 723649sdfshfrlgh79 23y932679325235256 3287502873580263564 28375026350732529", " "), "Delete", "Global") set(#position, 1, "Global") loop($list total(%list)) { if($comparison(#position, "=", 9)) { then { set(#position, 1, "Global") add item to list(%list2, $nothing, "Don\'t Delete", "Global") } else { add item to list(%list2, $next list item(%list), "Delete", "Global") } } increment(#position) } navigate("http://pastebin.com/", "Wait") change attribute(<name="paste_code">, "value", $text from list(%list2, " ")) Quote Link to post Share on other sites
Anonym 53 Posted February 20, 2012 Report Share Posted February 20, 2012 Why not loop through, have a counter and do a modulus with 8 on the counter!? When there is no remains from the division, you know that it is completely possible to divide by 8 (every eigth row), then put in the extra row and continue. This way the list can be as long as the numeric representation of the counter, so if it is a 32 bit counter it can be 2.1 billion items long. There will be about the same amount of code as for Kreatus' solution. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted February 20, 2012 Report Share Posted February 20, 2012 Another take on same thing.. clear list(%list) clear list(%list2) add list to list(%list, $list from text("gibberish5237015 dsfasar325725153 gjaeryuae5672552 ajyer9a764792t53 2384702347870234 3580273508273507 0esar7670ae6t902 723649sdfshfrlghea 23y9326793252352dsad 3287502873580263d 2837502635073252 gibberish5237015d3 dsfasar325725153423 gjaeryuae56725527 ajyer9a764792t5377 23847023478702347 35802735082735077 0esar7670ae6t90275 723649sdfshfrlgh657 23y932679325235275 3287502873580263765 28375026350732527 gibberish5237015765 dsfasar32572515357 gjaeryuae56725527765 2384702347870234765 3580273508273507756 0esar7670ae6t9029 723649sdfshfrlgh79 23y932679325235256 3287502873580263564 28375026350732529", " "), "Delete", "Global") set(#list position, 0, "Global") set(#position, 1, "Global") loop($list total(%list)) { if($comparison(#position, ">=", 8)) { then { set(#position, 1, "Global") add item to list(%list2, $nothing, "Don\'t Delete", "Global") } else { add item to list(%list2, $list item(%list, #list position), "Don\'t Delete", "Global") increment(#list position) } } increment(#position) } clear list(%list) Quote Link to post Share on other sites
ladygaming 1 Posted February 20, 2012 Author Report Share Posted February 20, 2012 thanks kindly guys ! gonna try them out !! Thanks again! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.