Natas70 Posted November 2, 2008 Share Posted November 2, 2008 I need some help speeding this process up, all the msgbox's, are only for my knowledge to check to see if data is incrementing correctly I am writing a script to download a new pricelist off of a free site for MTGO, to change the prices on my rented bots pricelist. It loads both text files into arrays then i need it to compare new to cbs then change the values in the cbs array before i write it back to the file. i am first trying to compare (if) the card set then compare (if) the card name are the same if both are correct then adjust the cbs array is it possible to speed this up, am i totally doing this wrong? ____________________________________________________________________________________________________ _______________ snippit of the files cbs first 04 000 04 000 157 5DN R Summoner's Egg# 0.230 0.506 0.161 0.209 04 000 04 000 158 5DN R Summoning Station# 0.580 1.290 0.411 0.535 new price list 10E Abundance 0.260 0.370 1 10E Academy Researchers 0.030 0.070 6 ____________________________________________________________________________________________________ ________________ here is a snippit of the code $l and $k are incremental counters, $cbscounter and $newcounter are the total number of rows in array ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ;@@@@@@@ condense the new into the cbs @@@@@@@ ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $k = 1 do for $l = 1 to $cbscounter step 1 ;MsgBox(4096, "test", $cbsarray [$l][8] & " " & $newarray [$k][2] & " " & $cbsarray [$l][6] & " " & $newarray [$k][1] ) if $cbsarray [$l][7] = $newarray [$k][1] Then ;MsgBox(4096, "test", $cbsarray [$l][8] & " " & $newarray [$k][2] & " " & $cbsarray [$l][6] & " " & $newarray [$k][1] ) if $cbsarray [$l][8] = $newarray [$k][2] Then MsgBox(4096, "done", $cbsarray [$l][8] & " " & $newarray [$k][2] & " " & $cbsarray [$l][6] & " " & $newarray [$k][1] ) $cbsarray [$l][9] = $newarray [$k][3] $cbsarray [$l][10] = ($newarray [$k][1] * 1.10) $cbsarray [$l][11] = $newarray [$k][4] $cbsarray [$l][12] = ($newarray [$k][1] * .90) ;MsgBox(4096, "test", $cbsarray [$l][2] & " " & $newarray [$k][3] & " " & $l & " " & $k ) EndIf ;MsgBox(4096, "test", $cbsarray [$l][8] & " " & $newarray [$k][2] & " " & $l & " " & $k ) endif Next ;MsgBox(4096, "test", $l & " " & $k ) $k = $k + 1 until $k = $newcounter ____________________________________________________________________________________________________ ________________________ thanx for any information you can share with me, i would most appreciative. James Link to comment Share on other sites More sharing options...
Natas70 Posted November 2, 2008 Author Share Posted November 2, 2008 i do want to apologize, this was indented and looked better before i posted it... i am not sure what happened... James Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now