exodius Posted June 12, 2006 Share Posted June 12, 2006 Post #18 is what you get when you run the second Code Quote box in post #16? When I try to run that code it doesn't produce anything because the conditions are never met. Link to comment Share on other sites More sharing options...
Sorak99 Posted June 12, 2006 Author Share Posted June 12, 2006 Post #18 is what you get when you run the second Code Quote box in post #16? When I try to run that code it doesn't produce anything because the conditions are never met.Oh, I'm sorry. I thought you were referring to the alteration of yours this entire time. My aplogies, no i cant get that one to work either, but i'm still working on it. George Link to comment Share on other sites More sharing options...
exodius Posted June 12, 2006 Share Posted June 12, 2006 Gotcha now that we're on the same page, the output from that first code box in post #16 looks like what you put in #18, what do you want it to look like after munging with it some more? (can you type up an example?) Link to comment Share on other sites More sharing options...
Sorak99 Posted June 12, 2006 Author Share Posted June 12, 2006 Gotcha now that we're on the same page, the output from that first code box in post #16 looks like what you put in #18, what do you want it to look like after munging with it some more? (can you type up an example?)Ultimately I would prefer this: 7.625 -3.968 -3.84 -3.809 -3.6797.5 -3.694 -3.57 -3.57 -3.4457.375 -3.348 -3.23 -3.225 -3.1067.25 -3.238 -3.125 -3.08 -2.9667.125 -3.026 -2.918 -2.878 -2.7697 -2.686 -2.584 -2.564 -2.466.875 -2.302 -2.204 -2.184 -2.0856.75 -1.843 -1.751 -1.693 -1.66.625 -1.328 -1.241 -1.149 -1.0616.5 -0.823 -0.741 -0.675 -0.5926.375 -0.287 -0.211 -0.14 -0.0627.625 -3.493 -3.364 -3.314 -3.1847.5 -3.151 -3.027 -2.972 -2.8477.375 -3.259 -3.141 -3.08 -2.9617.25 -3.032 -2.919 -2.853 -2.7397.125 -2.763 -2.655 -2.584 -2.4757 -2.395 -2.292 -2.216 -2.1126.875 -1.947 -1.849 -1.768 -1.6696.75 -1.431 -1.339 -1.252 -1.1596.625 -0.949 -0.862 -0.77 -0.6826.5 -0.421 -0.339 -0.242 -0.1596.375 0.167 0.243 0.327 0.4057.125 -3.552 -3.446 -3.339 -3.3277 -3.281 -3.18 -3.078 -3.0616.875 -2.898 -2.803 -2.706 -2.6516.75 -2.61 -2.519 -2.427 -2.3296.625 -2.426 -2.341 -2.254 -2.166.5 -2.135 -2.055 -1.973 -1.8746.375 -1.712 -1.637 -1.561 -1.4576.25 -1.294 -1.225 -1.154 -1.0456.125 -0.569 -0.505 -0.439 -0.3886 -0.187 -0.128 -0.067 -0.0115.875 0.282 0.336 0.391 0.421So each program is seperated, But i would be estatic with:7.625 -3.968 -3.84 -3.809 -3.679 7.625 -3.493 -3.364 -3.314 -3.184 7.125 -3.552 -3.446 -3.339 -3.3277.5 -3.694 -3.57 -3.57 -3.445 7.5 -3.151 -3.027 -2.972 -2.847 7 -3.281 -3.18 -3.078 -3.0617.375 -3.348 -3.23 -3.225 -3.106 7.375 -3.259 -3.141 -3.08 -2.961 6.875 -2.898 -2.803 -2.706 -2.6517.25 -3.238 -3.125 -3.08 -2.966 7.25 -3.032 -2.919 -2.853 -2.739 6.75 -2.61 -2.519 -2.427 -2.3297.125 -3.026 -2.918 -2.878 -2.769 7.125 -2.763 -2.655 -2.584 -2.475 6.625 -2.426 -2.341 -2.254 -2.167 -2.686 -2.584 -2.564 -2.46 7 -2.395 -2.292 -2.216 -2.112 6.5 -2.135 -2.055 -1.973 -1.8746.875 -2.302 -2.204 -2.184 -2.085 6.875 -1.947 -1.849 -1.768 -1.669 6.375 -1.712 -1.637 -1.561 -1.4576.75 -1.843 -1.751 -1.693 -1.6 6.75 -1.431 -1.339 -1.252 -1.159 6.25 -1.294 -1.225 -1.154 -1.0456.625 -1.328 -1.241 -1.149 -1.061 6.625 -0.949 -0.862 -0.77 -0.682 6.125 -0.569 -0.505 -0.439 -0.3886.5 -0.823 -0.741 -0.675 -0.592 6.5 -0.421 -0.339 -0.242 -0.159 6 -0.187 -0.128 -0.067 -0.0116.375 -0.287 -0.211 -0.14 -0.062 6.375 0.167 0.243 0.327 0.405 5.875 0.282 0.336 0.391 0.4217.625 -3.796 -3.668 -3.637 -3.507 7.625 -3.068 -2.94 -2.889 -2.76 7.125 -3.179 -3.073 -2.966 -2.9547.5 -3.551 -3.427 -3.427 -3.302 7.5 -2.737 -2.614 -2.558 -2.434 7 -2.933 -2.832 -2.73 -2.7137.375 -3.171 -3.053 -3.048 -2.929 7.375 -2.486 -2.368 -2.307 -2.188 6.875 -2.596 -2.501 -2.404 -2.3497.25 -3.116 -3.003 -2.958 -2.844 7.25 -2.212 -2.098 -2.033 -1.918 6.75 -2.303 -2.212 -2.12 -2.0227.125 -2.904 -2.796 -2.756 -2.647 7.125 -1.978 -1.87 -1.799 -1.69 6.625 -2.029 -1.944 -1.857 -1.7637 -2.572 -2.47 -2.45 -2.346 7 -1.667 -1.565 -1.488 -1.385 6.5 -1.767 -1.687 -1.605 -1.5066.875 -2.178 -2.08 -2.06 -1.961 6.875 -1.217 -1.119 -1.038 -0.939 6.375 -1.373 -1.298 -1.222 -1.1186.75 -1.762 -1.67 -1.612 -1.519 6.75 -0.707 -0.615 -0.528 -0.435 6.25 -0.985 -0.916 -0.845 -0.7366.625 -1.353 -1.266 -1.174 -1.086 6.625 -0.008 0.079 0.171 0.259 6.125 -0.169 -0.105 -0.039 0.0126.5 -0.897 -0.815 -0.749 -0.666 6.5 0.617 0.699 0.796 0.879 6 0.205 0.264 0.325 0.3816.375 -0.413 -0.337 -0.266 -0.188 6.375 1.279 1.355 1.438 1.516 5.875 0.366 0.42 0.475 0.505Similar to the way they came with your original code.George Link to comment Share on other sites More sharing options...
exodius Posted June 13, 2006 Share Posted June 13, 2006 I've not figured it out yet George, but this is my latest... and may be all the further I get on it tonight. expandcollapse popup#include <File.au3> #include <Array.au3> #include<string.au3> Opt ( "TrayIconDebug", 1 ) Dim $array Dim $NewLine = 0 Global $Line Dim $y = "-" _FileReadToArray ( "citi.txt", $array ) FileDelete ( "test.csv" ) For $x = 1 TO $array[0] - 1 ToolTip ( $x & " ==> "& $y, 0, 0 ) $SpaceFix = StringStripWS ( $array[$x], 1 ) $SpaceFix = stringreplace($SpaceFix, "...", " ") $SpaceFix = StringReplace ( StringStripWS ( StringStripCR ( $SpaceFix ), 4 ), " ", "," ) $Split = StringSplit ( $SpaceFix, "," ) for $y = 0 to $Split[0] - 1 ToolTip ( $x & " ==> "& $y, 0, 0 ) $z = StringReplace($split[$y], ".", "") $z = StringReplace($z, ")", "") $z = StringReplace($z, "(", "") If StringInStr( $split[$y], ".") and stringisdigit($z) Then If Not StringInStr ( $Split[$y], "(" ) And $NewLine = 0 Then $Line = $Split[$y] & "," $NewLine = 1 EndIf If StringInStr ( $Split[$y], "(" ) And $NewLine = 1 Then $Line = $Line & $Split[$y] & "," If Not StringInStr ( $Split[$y + 1], "(" ) Then $y = $y - 1 $NewLine = 2 Else ContinueLoop EndIf EndIf If $NewLine = 2 Then FileWriteline ("test.csv",StringTrimRight ( $Line, 1 ) ) $NewLine = 0 $Line = "" EndIf EndIf Next Next Link to comment Share on other sites More sharing options...
Sorak99 Posted June 13, 2006 Author Share Posted June 13, 2006 (edited) expandcollapse popup#include <File.au3> #include <Array.au3> #include<string.au3> Opt ( "TrayIconDebug", 1 ) Dim $array _FileReadToArray ( "C:\test.csv", $array ) FileDelete ( "C:\test2.csv" ) Dim $maybe $lineprev = 0 $dataprev = 0 $a = 0 For $x = 1 TO $array[0] - 1 ToolTip ( $x, 0, 0 ) $Split = StringSplit ( $array[$x], "," ) $line = number($Split[3]) $data = $Split[1] if $line > $lineprev Then FileWriteLine ("C:\test2.csv", $dataprev & "," ) $dataprev = $data $lineprev = $line $a = $a + 1 ; starting to put in a counter and reverse counter elseif $line = $lineprev then $datanew = _StringInsert($dataprev, "," & $data, stringlen($dataprev)) $dataprev = $datanew $lineprev = $line EndIf Next Check this out! Been working on it for a long time. Pretty much dwelling over it since my last post. It rebuilds the tables... kinda, after your modified code runs, i run this one. Now I'm trying to space each section out so that the first entry is 50 lines from the next first entry (so i can have a stable excel sheet formula that uses the cell references) Then i can use a customized program for each sheet to divi up the lines that have like 3 or more tables. George Edit: Saw your post after i posted mine, Give me time to study yours, takes me a long time still Edited June 13, 2006 by Sorak99 Link to comment Share on other sites More sharing options...
exodius Posted June 13, 2006 Share Posted June 13, 2006 Your code looks right on track, moreso even than mine I think... You could look at mine to see how I was trying to do stuff, but I think we should try to get what you came up with working. Link to comment Share on other sites More sharing options...
Sorak99 Posted June 13, 2006 Author Share Posted June 13, 2006 (edited) Your code looks right on track, moreso even than mine I think... You could look at mine to see how I was trying to do stuff, but I think we should try to get what you came up with working. Sounds goodEdit: possible to write to a specifi line? my variable doesnt work. Edited June 13, 2006 by Sorak99 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