Quantcast
Channel: GSAK Forum
Viewing all articles
Browse latest Browse all 75687

CorrectedCoord2UserNote.gsk by Kai Team - 2022-09-08

$
0
0
QUOTE (Skilgannon @ September 08, 2022 02:15 pm)
Due to careless use of CorrectedCoord2UserNote.gsk many caches now show the following result at the top of UserNotes.

~*Corrected Coordinates: N 52° xx.xxx E 5° xx.xxx*~
21-11-2018 9:41:40

With the use of RemoveCorrectedCoordsFromUserNote.gsk this mistake can be changed in:

Empty line due to CRLF (In above mentioned Macro: $CleanNote=Replace("|CRLF|",$_CrLf,$CleanNote)
21-11-2018 9:41:40

Is it possible to modify RemoveCorrectedCoordsFromUserNote.gsk in such way that the result will be only the date and NOT first an empty line.

21-11-2018 9:41:40

No, because the code you quoted does not do what you think it does. Together, these two lines:

GSK
$CleanNote=Sqlite("sql",$_sql,"crlfcvt=|CRLF|")
$CleanNote=Replace("|CRLF|",$_CrLf,$CleanNote)

preserve new lines (carriage return/line feed or CR/LF) elsewhere in your user note (the corrected coordinates have already been removed by the time those lines are executed). I could change the code to always remove a CRLF following the corrected coordinates but I do not think that is desirable in all cases (e.g. if the corrected coordinates appear in the middle of a user note, instead of at the very top).

If the new line you want to remove is always at the top of your User Note you should be able to remove it using this code:

GSK
GOTO Position=Top
TRANSACTION Action=Begin
WHILE NOT($_EOL)
  $d_UserNote=RegexReplace("^$_CrLf",$d_UserNote,"")
   GOTO Position=Next
ENDWHILE
TRANSACTION Action=End

Backup your database first, and set a filter on the caches where you want to remove the new line.

Viewing all articles
Browse latest Browse all 75687

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>