+Jurgen & co Posted November 16, 2005 Share Posted November 16, 2005 The stats-macro is working fine now her. Link to comment
+Gener_Lee Posted November 16, 2005 Share Posted November 16, 2005 Personally I find this version of GSAK works wonderful, but I probably do not use it as hard as some out there. Just a question and a thought. I noticed in the New (and Wonderful) load stats the box listing Waypoints updated, and Waypoints already updated. Is there any way I can filter off only the waypoints that have been updated (leaving behind waypoints that are already up to date)? I ask the question because I currently export Cachemate all the updated waypoints after the load using the User-flag set filter and setting the "Set user Flag", "Clear all user Flags first", and update Newer only But I notice that I will get the Updated and "Updated" but no change in GSAK Anyway just wondering Link to comment
+beejay&esskay Posted November 16, 2005 Share Posted November 16, 2005 Change date - this new date reflects the date a cache was actually changed as the result of loading a GPX file. The date is only set if something in the cache actually changes - this can be verified by looking at the change log. As the update in build 31 could not be retrospective, on conversion this date was set to the Last update GPX date. There is a new field that you could use in the filter. Link to comment
+ClydeE Posted November 16, 2005 Author Share Posted November 16, 2005 (edited) When I click the "Show Full Change Log" link in the "Load Summary", it loads the "C:\Program Files\GSAK\data\[dbname]\Log.htm" in Internet Explorer, even though my default browser is FireFox. GSAK uses IE to render the HTML to display that dialog box (just like the split screen). So when you click on that link it is exactly the same as if you started IE and click on a link. AFAIK there is no way to get IE to invoke another browser when you click on a link. If you really don't want see IE fire up, then you can still get this summary via the "File=>Display last change log" which will invoke your default browser. Oh, and while I'm at it.. could you make the mouse cursor snap to the active buttons (if option is set in the mouse properties)? If not, you might have a reason, if you don't mind sharing it. I'm sorry, this setting is not supported. Edited November 16, 2005 by ClydeE Link to comment
+ClydeE Posted November 17, 2005 Author Share Posted November 17, 2005 the F2-button doesn’t toggle the split screen when you’ve clicked the browser frame (for scrolling). with active list frame in split screen it works as in 6.0.2. Thanks, fixed in next build. Link to comment
+ClydeE Posted November 17, 2005 Author Share Posted November 17, 2005 (edited) Build 49 now ready for download Changes since initial build 48 release: 1. Fixed $d_HasCorrected causing "invalid expression in macro when used" 2. Fixed a problem in the load summary when ~ character was part of the name of the file loaded per this post 3. Any PQ that has 500 waypoints now highlight red. (See notes) 4 Added error message if doing move/copy and destination database is in old format per this post 5. Fixed Macro editor being installed to the wrong folder per this post 6. Fixed a problem with corrected coordinates. (see notes) 7. Captured IO error 32 on csv export per this post 8. Fixed typo in install license agreement 9. Fixed a problem when doing a restore of a database and settings to a new install (see notes) 10. Fixed problem of F2 not cancelling split screen mode per this post 11. Fixed macro command MFILTER "sleeper bug" (see notes) 12. Fixed problem of uninstall not removing gsak icon from desktop and macro editor from start programs 13. FAQ and help file updates 3 - As a result of this post any GPX file that you load that has exactly 500 waypoints now has the count highlighted in red. If you don't like this colour (and other formatting) you can change it by creating your own CSS. For more information please see http://gsak.net/ver650/hs32630.htm 6 - If you had a filter that only showed waypoints that did not have corrected coordinates and then added corrected coordinates for one of the waypoints, then that entry should be removed from the grid. 9 - Doing a File=>Restore to a "Virgin" GSAK would not correctly restore the databases until you ran the restore for the second time. 11 - All string variables used with = (equal) in the MFILTER command were not matching because of trailing spaces. This one is a "sleeper" becuase it has been around ever since the MFILTER command was introduced. Download here Note: After download and install, To confirm you have the latest version click on Help=>About and it should show: GSAK Version 6.5.0 (Build 49) Edited November 17, 2005 by ClydeE Link to comment
+Jamie Z Posted November 17, 2005 Share Posted November 17, 2005 Going for it now. Thanks a ton, Clyde! I still really like the log count. Jamie Link to comment
+Les Nomades Posted November 17, 2005 Share Posted November 17, 2005 Hi, Before downloading and installing v6.5, do you recommand uninstalling v6.0? Thanx Link to comment
+ClydeE Posted November 17, 2005 Author Share Posted November 17, 2005 Before downloading and installing v6.5, do you recommand uninstalling v6.0? You can if you like, but there should be no problems installing over a previous version. The only exception to this rule is if you have a very old version of GSAK, but you have already mentioned 6.0 so this should be fine. I know there have been quite a few users that have done this already and I am not aware of any issues to date. Link to comment
ElmoClarity Posted November 17, 2005 Share Posted November 17, 2005 Just saw there is a new build and getting it now. I did find a problem with 48 and didn't see anything about it in the release notes for 49. I extracted a compressed GPX file into its own directory and dragged and dropped the file into GSAK. I have the option set to delete the file after import. Once the file has been imported and the directory is empty, I attempt to delete the folder and get an error message the the folder is still being used. If I close GSAK, I can then delete the directory. Link to comment
+Hynr Posted November 17, 2005 Share Posted November 17, 2005 Other than the fact that everything seems to work great: I have the perception that loading gpx files (with 6.5 build 48) has slowed down a bit (maybe 10-20% slower) compared to version 6.1. I have no way to substantiate that, just a feeling. Link to comment
+ClydeE Posted November 17, 2005 Author Share Posted November 17, 2005 Other than the fact that everything seems to work great: I have the perception that loading gpx files (with 6.5 build 48) has slowed down a bit (maybe 10-20% slower) compared to version 6.1. I have no way to substantiate that, just a feeling. Yes, testing with previous versions indicate around a 8-10% performance hit. This is mainly due to the fact that GSAK now has to compare every field in the database with the individual elements in the GPX file to determine if anything has actually changed. This gives us the ability to produce the new change log, log summary, and addition of a "changed" date. Hopefully this will be seen as an acceptable performance hit for the new functionality it provides. Link to comment
+ClydeE Posted November 17, 2005 Author Share Posted November 17, 2005 Just saw there is a new build and getting it now. I did find a problem with 48 and didn't see anything about it in the release notes for 49. I extracted a compressed GPX file into its own directory and dragged and dropped the file into GSAK. I have the option set to delete the file after import. Once the file has been imported and the directory is empty, I attempt to delete the folder and get an error message the the folder is still being used. If I close GSAK, I can then delete the directory. Thanks. Fixed in next build. Link to comment
+Gener_Lee Posted November 17, 2005 Share Posted November 17, 2005 There is a new field that you could use in the filter. Thanks that works Great .... Changed my Filter to look for Changed Date Complared to LAST GPX Date is same. Now it works great ... Thanks again Link to comment
+ClydeE Posted November 17, 2005 Author Share Posted November 17, 2005 There is a new field that you could use in the filter. Thanks that works Great .... Changed my Filter to look for Changed Date Complared to LAST GPX Date is same. Just a word of caution on that one. The last GPX date gets updated with the date of the GPX file rather than the date you load it. So if the GPX file is a week old, your change date will be today but last GPX will be a week ago and that filter won't give you the result you want. I would recommend using "during" : Link to comment
ElmoClarity Posted November 17, 2005 Share Posted November 17, 2005 Just saw there is a new build and getting it now. I did find a problem with 48 and didn't see anything about it in the release notes for 49. I extracted a compressed GPX file into its own directory and dragged and dropped the file into GSAK. I have the option set to delete the file after import. Once the file has been imported and the directory is empty, I attempt to delete the folder and get an error message the the folder is still being used. If I close GSAK, I can then delete the directory. Thanks. Fixed in next build. Great. Thanks for the quick action on this one. Link to comment
+PDOP's Posted November 17, 2005 Share Posted November 17, 2005 Build 49 now ready for download Changes since initial build 48 release: 3 - As a result of this post any GPX file that you load that has exactly 500 waypoints now has the count highlighted in red. If you don't like this colour (and other formatting) you can change it by creating your own CSS. For more information please see http://gsak.net/ver650/hs32630.htm Clyde thanks for that change. Somewhere in the Help text it might be idea to note for novice users that a Pocket Query that generates a GPX file that has exactly 500 waypoints could possibly be (is most probably) missing caches matching the criteria of the query. Also the Help files index could use entries for "Load Summary" and "Change Log" Link to comment
+Gener_Lee Posted November 17, 2005 Share Posted November 17, 2005 Just a quick note of something I found. Not really a bug, but it is a little confusing. When you view a filter. The extra blanks on the Date Tab do not refelect the status of the current Filter, they reflect the last change. I will note that the data is correct, but say if I have one filter that compares the changed date then the "Last Found" pull down and "is same" pull is used. Then I look at another that uses Duing "1 days" Well when I look at it it says .... During and the pulls for "Last Found" and "Is Same" are still there not the fields for During the last 1 days. Hope that is clear enough Link to comment
+ClydeE Posted November 17, 2005 Author Share Posted November 17, 2005 Build 49 now ready for download Changes since initial build 48 release: 3 - As a result of this post any GPX file that you load that has exactly 500 waypoints now has the count highlighted in red. If you don't like this colour (and other formatting) you can change it by creating your own CSS. For more information please see http://gsak.net/ver650/hs32630.htm Clyde thanks for that change. Somewhere in the Help text it might be idea to note for novice users that a Pocket Query that generates a GPX file that has exactly 500 waypoints could possibly be (is most probably) missing caches matching the criteria of the query. Also the Help files index could use entries for "Load Summary" and "Change Log" OK, I will add that in. Link to comment
+ClydeE Posted November 17, 2005 Author Share Posted November 17, 2005 Just a quick note of something I found. Not really a bug, but it is a little confusing. When you view a filter. The extra blanks on the Date Tab do not refelect the status of the current Filter, they reflect the last change. I will note that the data is correct, but say if I have one filter that compares the changed date then the "Last Found" pull down and "is same" pull is used. Then I look at another that uses Duing "1 days" Well when I look at it it says .... During and the pulls for "Last Found" and "Is Same" are still there not the fields for During the last 1 days. Hope that is clear enough Hmm, I can't duplicate this, but I must confess I don't really understand what you have done there Perhaps if you could email me a screen shot of the problem together with the exact steps your are taking to arrive at that position. Link to comment
+Les Nomades Posted November 18, 2005 Share Posted November 18, 2005 Hi Clyde, Downloaded 6.5 build 49. When going over squares with cursor in FTF and WATCH columns, every square that has no check in it, FALSE appears and every square has a check in it, the word TRUE appears. Is that suppose to be? Doesn't do that in the USER FLAG column. Thank you Link to comment
+clan_Barron Posted November 18, 2005 Share Posted November 18, 2005 Downloaded the 6.5 beta build 49 (and love all the changes as always) but I have a question about find counts. After loading the pocket query with all of my finds my find count in GSAK was off by +2. I went to Tools->Options->Display and turned on the find count column and ordered by fcount. It showed I had 2 caches that I had 2 finds on. How do I go in and removed the duplicate find. All I could figure out how to do was just mark the cache as not found totally. Link to comment
+ClydeE Posted November 18, 2005 Author Share Posted November 18, 2005 Downloaded the 6.5 beta build 49 (and love all the changes as always) but I have a question about find counts. After loading the pocket query with all of my finds my find count in GSAK was off by +2. I went to Tools->Options->Display and turned on the find count column and ordered by fcount. It showed I had 2 caches that I had 2 finds on. How do I go in and removed the duplicate find. All I could figure out how to do was just mark the cache as not found totally. The found count is derived from your found logs, so it is a found log that needs deleting. Right mouse click on a cache and select "Delete a log", then delete the incorrect found log. Link to comment
+ClydeE Posted November 18, 2005 Author Share Posted November 18, 2005 Downloaded 6.5 build 49. When going over squares with cursor in FTF and WATCH columns, every square that has no check in it, FALSE appears and every square has a check in it, the word TRUE appears. Is that suppose to be? Doesn't do that in the USER FLAG column. Hmm, this is a strange one. I have no other reports of this and I can't really visualize what is happening here. Could you please take the option "Tools=>Send debug info to Clyde" and then email me the tracking number together with a screen shot of this problem. Link to comment
+Les Nomades Posted November 18, 2005 Share Posted November 18, 2005 Could you please take the option "Tools=>Send debug info to Clyde" and then email me the tracking number together with a screen shot of this problem. How do I take a screen shot, sorry for not knowing Link to comment
+Les Nomades Posted November 18, 2005 Share Posted November 18, 2005 (edited) It's just like if you put your mouse over NEW TOPIC at the bottom of this page, a small pop up says START NEW TOPIC and stays on for about 2 seconds, well it's the same thing in GSAK Edited November 18, 2005 by Nomades Link to comment
+ClydeE Posted November 18, 2005 Author Share Posted November 18, 2005 It's just like if you put your mouse over TOPIC in the bottom of this page, a small pop up says NEW TOPIC and stays on for about 2 seconds, well it's the same thing in GSAK Ok, I am with you now. The heading in these two columns are causing problems. This will happen on any column in GSAK if the information in that column will not fit the width correctly. Make the column wider and then that should get rid of this popup for the moment. I will need to change the default column headings so this won't happen. Link to comment
+Les Nomades Posted November 18, 2005 Share Posted November 18, 2005 (edited) Wow Clyde, right on, problem fixed. Thanx a million Edited November 18, 2005 by Nomades Link to comment
+Gener_Lee Posted November 18, 2005 Share Posted November 18, 2005 Just a quick note of something I found. Not really a bug, but it is a little confusing. When you view a filter. The extra blanks on the Date Tab do not refelect the status of the current Filter, they reflect the last change. I will note that the data is correct, but say if I have one filter that compares the changed date then the "Last Found" pull down and "is same" pull is used. Then I look at another that uses Duing "1 days" Well when I look at it it says .... During and the pulls for "Last Found" and "Is Same" are still there not the fields for During the last 1 days. Hope that is clear enough Hmm, I can't duplicate this, but I must confess I don't really understand what you have done there Perhaps if you could email me a screen shot of the problem together with the exact steps your are taking to arrive at that position. It turns out that the Last Changed date is the only one with this problem E-mail sent with more detail and print-screens Link to comment
+ClydeE Posted November 18, 2005 Author Share Posted November 18, 2005 Just a quick note of something I found. Not really a bug, but it is a little confusing. When you view a filter. The extra blanks on the Date Tab do not refelect the status of the current Filter, they reflect the last change. I will note that the data is correct, but say if I have one filter that compares the changed date then the "Last Found" pull down and "is same" pull is used. Then I look at another that uses Duing "1 days" Well when I look at it it says .... During and the pulls for "Last Found" and "Is Same" are still there not the fields for During the last 1 days. Hope that is clear enough Hmm, I can't duplicate this, but I must confess I don't really understand what you have done there Perhaps if you could email me a screen shot of the problem together with the exact steps your are taking to arrive at that position. It turns out that the Last Changed date is the only one with this problem E-mail sent with more detail and print-screens Thanks. The screen shots were very helpful. Yes, this is certainly a bug with the displaying of items when using the new changed date in a filter Fixed in next build. Link to comment
+beejay&esskay Posted November 18, 2005 Share Posted November 18, 2005 On the arc/poly filter tab, the explanatory text for "Polygon" is partially obscured by the radio button selection box. I can read the first 2 lines of the 3rd paragraph and can see there is at least another line, but I can't read it. Even if this is because I've set things to have larger print, there is plenty of space on that tab to move the radio buttons down. Link to comment
+ClydeE Posted November 18, 2005 Author Share Posted November 18, 2005 On the arc/poly filter tab, the explanatory text for "Polygon" is partially obscured by the radio button selection box. I can read the first 2 lines of the 3rd paragraph and can see there is at least another line, but I can't read it. Even if this is because I've set things to have larger print, there is plenty of space on that tab to move the radio buttons down. Thanks. Fixed in next build. Link to comment
+beejay&esskay Posted November 18, 2005 Share Posted November 18, 2005 Polygon filter error: I have a polygon filter of: # Boston Heights, OH 41.25400, -81.50991 # County line and I-80 41.25485, -81.39031 # SE of major park on Summit/? County line 41.18364, -81.39031 # Even with NW/SE point 41.18364, -81.50991 41.25400, -81.50991 It selects the right caches (as far as I can tell), but it also includes GCR0W5 at 41.254, -81.815233. As you can see, that cache is too far west to be correctly included. It seems likely it was included because of a miscalculation based on the fact the latitude exactly matches the starting point of the polygon. If I adjust the polygon to 41.25401, that cache disappears from the selection. (But something still isn't right here.) Link to comment
+ClydeE Posted November 18, 2005 Author Share Posted November 18, 2005 (edited) Polygon filter error: I have a polygon filter of: # Boston Heights, OH 41.25400, -81.50991 # County line and I-80 41.25485, -81.39031 # SE of major park on Summit/? County line 41.18364, -81.39031 # Even with NW/SE point 41.18364, -81.50991 41.25400, -81.50991 It selects the right caches (as far as I can tell), but it also includes GCR0W5 at 41.254, -81.815233. As you can see, that cache is too far west to be correctly included. It seems likely it was included because of a miscalculation based on the fact the latitude exactly matches the starting point of the polygon. If I adjust the polygon to 41.25401, that cache disappears from the selection. (But something still isn't right here.) Thanks, but I need your help to sort this one out. The calculation for the Polygon filter is done by GPSBabel. Could you please follow this up in the GPSBabel mailing lists Just after doing the Poly/arc filter take a copy of the following files as I suspect the Babel guys will need them to track down the problem. babel.bat - this file actually runs the gpsbabel command to select the waypoints gsak.stl - the style file gsak uses to pass the information to GPSBabel (input file) babel.txt - these are the actual waypoints that are the input for the GPSBabel command arc.txt - these are the points for the polygon arc.stl - the style file for the arclist.txt output arclist.txt - these are the points that GPSBabel is saying are in your polygon (output file) arc.txt and arclist.txt will be found in the "temp" folder of the install folder of GSAK All other files will be found in the install folder of GSAK Edit: your post alone may be enough for them to get to the bottom of it, but keep a copy of those files just in case Edited November 18, 2005 by ClydeE Link to comment
+KJ&MShelly Posted November 18, 2005 Share Posted November 18, 2005 I downloaded 6.5 b49 When I run the following macro, it keeps the file locked until I close GSAK. I am new to macros so I might have missed something to release the file. The macro works correctly, but I cannot change the file after I have run the macro. FileRead File=c:\geocache\directions.txt SET $number = AT("At GC", $line ) $pos=$number+3 If Substr( $line, $number, 5 ) = "At GC" $ofile = Substr( $line, $pos, 6) $ofile = "W,"+ $ofile + $_NewLine SET $Data = AppendFile("c:\geocache\here.txt",$ofile) EndIf SET $number = AT("Arrive GC", $line ) $pos=$number+7 If Substr( $line, $number, 9 ) = "Arrive GC" $ofile = Substr( $line, $pos, 6) $ofile = "W," + $ofile + $_NewLine SET $Data = AppendFile("c:\geocache\here.txt",$ofile) EndIf EndRead Link to comment
+beejay&esskay Posted November 18, 2005 Share Posted November 18, 2005 Polygon filter error: Thanks, but I need your help to sort this one out. The calculation for the Polygon filter is done by GPSBabel. Could you please follow this up in the GPSBabel mailing lists Edit: your post alone may be enough for them to get to the bottom of it, but keep a copy of those files just in case OK, will do. It's repeatable, so I'll wait to save the files until they tel me they need them. Link to comment
+ClydeE Posted November 18, 2005 Author Share Posted November 18, 2005 I downloaded 6.5 b49 When I run the following macro, it keeps the file locked until I close GSAK. I am new to macros so I might have missed something to release the file. The macro works correctly, but I cannot change the file after I have run the macro. FileRead File=c:\geocache\directions.txt SET $number = AT("At GC", $line ) $pos=$number+3 If Substr( $line, $number, 5 ) = "At GC" $ofile = Substr( $line, $pos, 6) $ofile = "W,"+ $ofile + $_NewLine SET $Data = AppendFile("c:\geocache\here.txt",$ofile) EndIf SET $number = AT("Arrive GC", $line ) $pos=$number+7 If Substr( $line, $number, 9 ) = "Arrive GC" $ofile = Substr( $line, $pos, 6) $ofile = "W," + $ofile + $_NewLine SET $Data = AppendFile("c:\geocache\here.txt",$ofile) EndIf EndRead Which file seems to have the lock, directions.txt or here.txt I copied your sample code and created a directions.txt file with some matching lines, however I did not end up with any locks on either file. No chance you have the file already locked in another program or editor? Any more information you can give me so that I might be able to produce the same problem.? Link to comment
+KJ&MShelly Posted November 18, 2005 Share Posted November 18, 2005 Which file seems to have the lock, directions.txt or here.txt directions.txt is locked. Cannot delete or change until I close GSAK no chance of it being locked by anyother program Link to comment
+ClydeE Posted November 18, 2005 Author Share Posted November 18, 2005 Which file seems to have the lock, directions.txt or here.txt directions.txt is locked. Cannot delete or change until I close GSAK no chance of it being locked by anyother program Hmm, no more information you can give me? Until I can reproduce the problem it will be difficult for me to fix. Did perhaps the macro abort before you ran it through without error? Could you try rebooting your computer, then start GSAK, then run the macro from start to finish. Does the macro run without error? Do you still get the file lock? Link to comment
+Z_Statman Posted November 18, 2005 Share Posted November 18, 2005 I have just added a macro to show some basic database statistics This macro will only run under version 6.5 and you can download here http://gsak.net/Macros.php Suggestions for other items to be added are welcome. Sample: Would be really neat if could combine all DBs, e.g., I have a Found DB + an active or Unfound DB. Z_S Link to comment
+ClydeE Posted November 18, 2005 Author Share Posted November 18, 2005 I have just added a macro to show some basic database statistics This macro will only run under version 6.5 and you can download here http://gsak.net/Macros.php Suggestions for other items to be added are welcome. Sample: Would be really neat if could combine all DBs, e.g., I have a Found DB + an active or Unfound DB. Z_S As a Generic macro for everyone this would not be a good idea because some users have many databases (and some big ones) that could cause this macro to take a very long time. However, there is no reason why you can't change the macro to suit yourself. Basically all you need to do is: 1. Create a temporary database 2. Select each database you want stats combined and copy to the temp database 3. Run the stats macro on the temp database 4. Delete the temp database The macro language has all the commands that would enable you to do this. Link to comment
+Gener_Lee Posted November 18, 2005 Share Posted November 18, 2005 Would be really neat if could combine all DBs, e.g., I have a Found DB + an active or Unfound DB. Z_S Basically all you need to do is: 1. Create a temporary database 2. Select each database you want stats combined and copy to the temp database 3. Run the stats macro on the temp database 4. Delete the temp database Here is one way of doing it following Clydes sudgestions My databases are "default" and "My Finds" <data> VarName=$MoveCopy [TfmMove] cbxDestination.Text=complete rbtAdd.Checked=True rbtAddFlag.Checked=False rbtAddIgnore.Checked=False rbtCopy.Checked=True rbtExistIgnore.Checked=False rbtFlagOnly.Checked=False rbtMove.Checked=False rbtReplace.Checked=True rbtReplaceFlag.Checked=False chkDisplay.Checked=False <enddata> IF DatabaseExists("complete") DATABASE Name="complete" Action=delete ENDIF DATABASE Name="complete" Action=create # get the main Database DATABASE Name="default" Action=select CancelFilter # Copy all to complete Macroset Dialog=MoveCopy VarName=$MoveCopy MOVECOPY Settings=<macro> # Add in my Founds Database DATABASE Name="My Finds" Action=select CancelFilter # Copy all to complete Macroset Dialog=MoveCopy VarName=$MoveCopy MOVECOPY Settings=<macro> # Run Stats on complete database DATABASE Name="complete" Action=select I put this code between the follow two statements in the original macro $Sort = $_SortBy <----- Put here CancelFilter $temp = GetEnvV("temp") Link to comment
+ClydeE Posted November 18, 2005 Author Share Posted November 18, 2005 As always there is more ways to skin a cat than one. This solution would be for users that have many databases or just a few large ones (and are not afraid to get down and dirty with macros). The problem with the create temp, move/copy is that the copying of the data is a bit inefficient and can take quite a while if the databases are large. The solution here is to use the MACRO command to call the stats.txt as a type of subroutine. That way you will be running the code on the original databases. A little bit of tweaking of the macro is required, but if you have come this far then I think you will follow. You will need to create another macro, and move the clearing of all variables (note, all GSAK variables are global in scope) to the start of the macro and move the code that generates and displays the HTML summary to the end of this macro. The other tweak required to make this work is that to accumulate the totals for each file you will need to replace statements like: $found = $_FilterCount To: $found = $found + $_FilterCount The "psuedo" code for the new macro would then look something like this: # setup and clear all variables $found = 0 $watch = 0 $dnf = 0 .... etc for all count variables # now do calcs for database 1 Database Name=Database1 Macro File="c:\path to stats\stats.txt" # now do calcs for database 2 Database Name=Database2 Macro File="c:\path to stats\stats.txt" ..... etc for every database # now finally the calcs that generate and display the HTML summary $out = "<html>" + $_NewLine $out = $out + "<style type='text/css'>" + $_NewLine $out = $out + "<!--" + $_NewLine $out = $out + ".Body{font-family:'Arial'}" + $_NewLine ...... etc, moved from stats.txt Link to comment
+Geo Froggy Posted November 19, 2005 Share Posted November 19, 2005 (edited) Hi Clyde, I just wanted you to know it works great with my Lowrance Iway 100. Thank you so much for adding the Lowrance support. Jackie Edited November 19, 2005 by Geo Froggy Link to comment
+ClydeE Posted November 19, 2005 Author Share Posted November 19, 2005 As always there is more ways to skin a cat than one. This solution would be for users that have many databases or just a few large ones (and are not afraid to get down and dirty with macros). The problem with the create temp, move/copy is that the copying of the data is a bit inefficient and can take quite a while if the databases are large. The solution here is to use the MACRO command to call the stats.txt as a type of subroutine. That way you will be running the code on the original databases. A little bit of tweaking of the macro is required, but if you have come this far then I think you will follow. You will need to create another macro, and move the clearing of all variables (note, all GSAK variables are global in scope) to the start of the macro and move the code that generates and displays the HTML summary to the end of this macro. The other tweak required to make this work is that to accumulate the totals for each file you will need to replace statements like: $found = $_FilterCount To: $found = $found + $_FilterCount The "psuedo" code for the new macro would then look something like this: # setup and clear all variables $found = 0 $watch = 0 $dnf = 0 .... etc for all count variables # now do calcs for database 1 Database Name=Database1 Macro File="c:\path to stats\stats.txt" # now do calcs for database 2 Database Name=Database2 Macro File="c:\path to stats\stats.txt" ..... etc for every database # now finally the calcs that generate and display the HTML summary $out = "<html>" + $_NewLine $out = $out + "<style type='text/css'>" + $_NewLine $out = $out + "<!--" + $_NewLine $out = $out + ".Body{font-family:'Arial'}" + $_NewLine ...... etc, moved from stats.txt If you are a bit of a novice at writing macros then just hold on for a while. After making that post I realized it wouldn't be to hard to change the existing macro to create a "subroutine" on the fly and work this way. I would still make the default version of the macro work on your current database but put in a few commented lines for you to work with if you wanted multiple databases. The only lines you would need to change would go something like this: # Database Name=xxxxx # Macro File=$sub # Database Name=xxxxx # Macro File=$sub So all you would need to do us uncomment these lines and change xxxx to your required database name. I am currently working on pumping out another build which should be out in the next day or so (yes I again have enough fixes to warrant one) and that will take priority. However, once done I will then finish this macro change and post on my website. Link to comment
+Z_Statman Posted November 19, 2005 Share Posted November 19, 2005 Scanned but did not notice if you have been told about getting "repeated characters" when use the (Online waypoint URL) link to the cache and then Log Visit. That is, type "Found" and get "FFFFoouuunnnddd" perhaps not all these repeats but you get the point. Z_S Link to comment
+ClydeE Posted November 19, 2005 Author Share Posted November 19, 2005 Scanned but did not notice if you have been told about getting "repeated characters" when use the (Online waypoint URL) link to the cache and then Log Visit. That is, type "Found" and get "FFFFoouuunnnddd" perhaps not all these repeats but you get the point. Thanks. Fixed in next build. Link to comment
+ClydeE Posted November 20, 2005 Author Share Posted November 20, 2005 I downloaded 6.5 b49 When I run the following macro, it keeps the file locked until I close GSAK. I am new to macros so I might have missed something to release the file. The macro works correctly, but I cannot change the file after I have run the macro. FileRead File=c:\geocache\directions.txt SET $number = AT("At GC", $line ) $pos=$number+3 If Substr( $line, $number, 5 ) = "At GC" $ofile = Substr( $line, $pos, 6) $ofile = "W,"+ $ofile + $_NewLine SET $Data = AppendFile("c:\geocache\here.txt",$ofile) EndIf SET $number = AT("Arrive GC", $line ) $pos=$number+7 If Substr( $line, $number, 9 ) = "Arrive GC" $ofile = Substr( $line, $pos, 6) $ofile = "W," + $ofile + $_NewLine SET $Data = AppendFile("c:\geocache\here.txt",$ofile) EndIf EndRead Which file seems to have the lock, directions.txt or here.txt I copied your sample code and created a directions.txt file with some matching lines, however I did not end up with any locks on either file. No chance you have the file already locked in another program or editor? Any more information you can give me so that I might be able to produce the same problem.? Finally tracked this one down. The one bit of information that was missing is that your macro must have aborted at some stage between the FileRead and EndRead commands. If the macro runs from start to finish, there is no problems. However, when I purposely keyed an invalid command in that loop, I could then reproduce the lock problem on the file. The file lock needs to be released when there is any error in the macro. Fixed in next build. Link to comment
+ClydeE Posted November 20, 2005 Author Share Posted November 20, 2005 Build 50 now ready for download Changes since Build 49: 1. Fixed load gpx file lock so can't delete folder per this post 2. Fixed log date being ignored for log filter 3. Fixed changed date not showing correctly per this post 4. Fixed true/false mouse hover problem per this post 5. Fixed source type being blank for single gpx file downloads per this post 6. Fixed text on arc/poly tab being obscured per this post 7. Fixed lock on file if macro aborts between FileRead and EndRead per this post 8. Fixed change log, "source" before image showing url rather than source code 9. Fixed repeated characters in split screen data entry per this post 10. Added macro command DELAY MS=nnnnn (see notes) 11. Help file updates 10 - The new macro command DELAY is more a debugging tool to slow down the running of a macro so you can see what is going on. There may be other uses you can think of a well Download here Link to comment
+ClydeE Posted November 20, 2005 Author Share Posted November 20, 2005 (edited) I have updated the stats.txt macro so it is now very easy to modify it to work on multiple databases per this post The relevant lines of code you need to change are: # now run the subroutine for each database you want counted (uncomment for multi database) #Database Name=xxxxxx #Macro File=$sub #Database Name=xxxxxx #Macro File=$sub # make sure to delete the following line if using multiple databases as above Macro File=$sub The new code should be a lot faster than creating a temp database and copying over waypoints as it now reads the databases directly. This new version of the stats.txt macro will only work with 6.5.0 build 50 of GSAK Download here http://gsak.net/Macros.php Edited November 20, 2005 by ClydeE Link to comment
Recommended Posts