Last active
December 20, 2015 20:09
-
-
Save dimm0k/6188802 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File := CSV_remrow(File, 1) | |
;broken because the lack of implicit brackets! | |
;[16:39] <+gilby> dimmATwerk, i think your else is matching the second if in your first function | |
CSV_remrow(InFile, RowToRemove, FindText="") | |
{ | |
Output = | |
if (RowToRemove != 0) | |
Loop, Parse, InFile, `n, `r | |
if (A_Index <> RowToRemove) | |
Output .= A_LoopField "`r`n" | |
else | |
Loop, Parse, InFile, `n, `r | |
if A_LoopField not contains %FindText% | |
Output .= A_LoopField "`r`n" | |
return Output | |
} | |
CSV_remrow2(InFile, RowToRemove, FindText="") | |
{ | |
Output = | |
if !(RowToRemove = 0) | |
Loop, Parse, InFile, `n, `r | |
if (A_Index = RowToRemove) | |
continue | |
else | |
Output .= A_LoopField "`r`n" | |
else | |
Loop, Parse, InFile, `n, `r | |
if A_LoopField not contains %FindText% | |
Output .= A_LoopField "`r`n" | |
return Output | |
} | |
;AfterLemon#ahk@freenode | |
CSV_remrow3(InFile, RowToRemove, FindText="") | |
{ | |
Output := "" | |
Loop, Parse, InFile, `n, `r | |
if (A_Index != RowToRemove) | |
if A_LoopField not contains %FindText% | |
Output .= A_LoopField "`r`n" | |
return Output | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment