Jump to content

Cachemate & GSAK


Coach88

Recommended Posts

Although I have some caches listed in the found category in cachemate, when I run the Macro it says: «No found caches in Filter!» How do I get from clicking on found with the date stamped in cachemate to logging in GC.com. I have CM2GPX installed and I can see that it's running when I execute the macro but like I mentionned I have caches listed in the found category but GSAK doesn't recognize this.

Link to comment

There are several steps.

 

1) Once you have marked caches marked as found in Cachemate you need to Hotsync the PDA with your computer.

 

2) You then need to import the found cache data into GSAK. To do this you need to convert the Cachemate data into a GPX file. This is done with the cm2gpx.exe whuch is a program included with GSAK. To run this you need to create a batch file that contains a line something like this:

 

C:\Progra~1\GSAK\cm2gpx\cm2gpx.exe -f -o C:\Progra~1\GSAK\cm2gpx\cm2gpx.gpx C:\Progra~1\palm\<PDANAME\Backup\DefaultItems-cMat.PDB

 

This will create a GPX file in the C:\Program Files\GSAK\cm2gpx folder.

 

3) Then you need to import the resulting GPX file into GSAK.

 

4) Once the cachemate data has been imported into GSAK you then can add to the UserNotes etc.

 

5) You can now use a macro to assist in logging your finds on GC.com

 

Here is a macro from the GSAK forum that will this, may need to modify a bit to meet your needs,

Cachemate Import Macro

Link to comment
I'm not sure I understand the part about running the batch file

 

To create the batch file all you need to do is copy the string below and paste it into a text editor like Notepad.

Then save the file (File > Save As) with the name of cm2gpx.bat

 

Save this bat file in the C:\Program Files\GSAK\cm2gpx folder.

 

Batch File String

C:\Progra~1\GSAK\cm2gpx\cm2gpx.exe -f -o C:\Progra~1\GSAK\cm2gpx\cm2gpx.gpx C:\Progra~1\palm\<PDANAME>\Backup\DefaultItems-cMat.PDB

 

Note: The portion in RED may need changed to work with your system.

 

Once you have the bat file created and saved then you need a GSAK macro to run the batch file. The macro referenced in my first post will work but may need some modification for your system.

Link to comment

I followed the procedure you suggested and when I run the macro i still get the message «no found caches in filter». I did a Hotsync with the Palm wich showed one cache in the found category. I had the time marker set and I wrote «test» in the notes. I checked the cm2gpx folder and there was no GPX file there.

Link to comment

Sounds like your batch file is not correct so it's not finding the correct Cachemate file.

 

Copy the text from your batch file and post it here.

 

Next post the name of the Palm folder. It can be found by opening My Computer, and then opening the Program Files folder. Most times it is either called Palm or PalmOne. Let me know which one it is?

 

Then open the Palm or PalmOne folder from above. You should see a folder that matched the Owner Name you gave your PDA. What is that name?

 

Now open that folder. Do you see a file called

DefaultItems-cMat.PDB
?

 

Once you answer these question we can check the batch file to make sure it is correct.

Link to comment
I'm not sure I understand the part about running the batch file

 

To create the batch file all you need to do is copy the string below and paste it into a text editor like Notepad.

Then save the file (File > Save As) with the name of cm2gpx.bat

 

Save this bat file in the C:\Program Files\GSAK\cm2gpx folder.

 

Batch File String

C:\Progra~1\GSAK\cm2gpx\cm2gpx.exe -f -o C:\Progra~1\GSAK\cm2gpx\cm2gpx.gpx C:\Progra~1\palm\<PDANAME>\Backup\DefaultItems-cMat.PDB

 

Note: The portion in RED may need changed to work with your system.

 

Once you have the bat file created and saved then you need a GSAK macro to run the batch file. The macro referenced in my first post will work but may need some modification for your system.

 

I copied the file above in the cm2gpx folder like you mentionned and I replace the red portion with «palmOne\MarioMcGraw». I checked and found the file «DefaultItems-cMat.pdb»

 

Also, I tried ExpressLogger wich is a webpage that lets you load your «DefaultItems-cMat.pdb» file and log your caches in the same manner the GSAK Macro would and it worked. I'm sure it's probably something minor that's preventing me from getting it right.

Link to comment

That's the info I was looking for. So you batch file looks like this;

 

C:\Progra~1\GSAK\cm2gpx\cm2gpx.exe -f -o C:\Progra~1\GSAK\cm2gpx\cm2gpx.gpx C:\Progra~1\palmOne\MarioMcGraw\Backup\DefaultItems-cMat.PDB

 

Correct?

 

And the batch file is located in the C:\Program Files\GSAK\cm2gpx folder, correct?

 

And your batch file is called cm2gpx.bat, correct?

 

If the above is all correct then lets try this. Go to the C:\Program Files\GSAK\cm2gpx folder, right click on the cm2gpx/bat file and select edit. This will open the batch file so you can read the contents.

 

Change the batch file by adding Pause on a seperate line under the original text. Like this:

 

C:\Progra~1\GSAK\cm2gpx\cm2gpx.exe -f -o C:\Progra~1\GSAK\cm2gpx\cm2gpx.gpx C:\Progra~1\palmOne\MarioMcGraw\Backup\DefaultItems-cMat.PDB

 

Pause

 

Then click on File and select Save.

Close the batch file window and double click on the batch file.

A DOS window will open as the batch file runs. You will see a couple lines of text appear as the batch file runs. Please copy and paste those lines here. Also after you have copied and pasted the text here select the DOS window and press the enter key. The DOS window will close. Look to see if there is now a cm2gpx.gpx file in the cm2gpx folder.

Link to comment

Ok, I added the pause line in the batch file, saved and ran it. I couldn't copy the text from the DOS window but when I looked in the folder, there it was... «cm2gpx.gpx». When I clicked on that file, it opened GSAK and asked to load the file. I loaded it and it said that it updated 18 waypoints. When it switched to my database it showed that my Found cache count was up by 18. This doesn't reflect my true Found count but we're making good progress. After my last «myfinds» PQ once I logged all my caches on the GC.com website, I should have had 322 found in GSAK but it showed 316. I was short by 6. Now it shows 334... up by 12.

 

At this point would you suggest that I delete all of my database in GSAK & cachemate and get a fresh start? If so, how do you suggest I set up my new databases?

Link to comment

I've got a couple questions to try to get a grip on your question about the number of finds.

 

1) How many total caches have you found?

 

2) How many found caches does Geocaching.com show you have found?

 

3) How many found caches does GSAK show you have?

 

4) Do you want to use GSAK to keep track of all your finds?

 

As to your other question, here is how I have my GSAK setup;

 

1) I have a number of databases for different areas here in Ohio. These databases are used for Non-Found caches. I populate and update these databases with different Geocaching Pocket Queries.

 

2) I have a seperate database for Found caches only.

 

3) When I return home from a day of caching, I hotsync my PDA.

 

4) I then run a GSAK macro that runs the cm2gpx.bat file, and then updates the found caches in the select area database.

 

5) I then run a macro that displays the UserNotes for each found cache (one at a time) allowing me to input any additional comments about the cache. It then copies the UserNotes to the Windows clip board, then the macro opens the GC.com logging page for the selected cache. I then past the UserNotes information into the logging page, select Found and then click on Submit (The macro also saves any comments I entered from above in the UserNotes). Once all caches have been logged the macro then moves all Found caches to the Found database.

Link to comment

1) I have 322 found caches

2)My statbar on the GC.com websites shows 322

3)GSAK showed 316 after I loaded MyFinds PQ. I ran the PQ after logging my last find and my stat bar showed 322 at that point. When the PQ loaded it also showed 322 waypoints

 

On the second topic...

 

I guess 1 & 2 are user preference and I'm still not sure which way I want to go; if i want to keep all in the same place or separate different regions like you mentionned

 

3,4 & 5 are what I'm interested in accomplishing.

Link to comment
3)GSAK showed 316 after I loaded MyFinds PQ. I ran the PQ after logging my last find and my stat bar showed 322 at that point. When the PQ loaded it also showed 322 waypoints

 

So is GSAK now showing the correct number of finds?

 

Now back to steps 3, 4, and 5.

 

Just to clarify, when you double click on the cm2gpx.bat file it created a cm2gpx.gpx file correct?

 

Also what version of GSAK are you running?

 

Below is a copy of the macro I use to run the cm2gpx.bat file and imports the cachemate data. Copy this text and paste it into a new Note Pad. Save it as cm2gpx.txt Save this file in the C:\Program Files\GSAK\Macros folder. To run this macro you can either create a macro button by following the instructions Add GSAK Macro Buttons or go to Macro > Run and navigate to the macro.

 

When run the macro will mark the found caches as Found, it will insert the Found Date and also insert any UserNotes. It will then run a filter that will only show the caches marked as found.

 

Once we see that this works we can then work on setting up a logging macro.

 

# Set System Variables
Set $Path=GetEnvv("HomeDrive")+GetEnvv("HomePath")

# Run CM2GPX - Converts Cachemate Database To GPX File
ShowStatus msg="Running Palm CM2GPX Converter"
RUNPGM pgm=$_Install\cm2gpx\cm2gpx.bat Wait=Yes

# Import Palm Cachemate Files - Found Caches And Logs
ShowStatus msg="Importing Palm Cachemate Files - Found Caches And Logs"
Macroset Dialog=CacheMateLog VarName=$CacheMateLog
CACHEMATE Settings=<macro> File=$_Install\cm2gpx\cm2gpx.gpx
EndIf

# Display Found Caches
MFilter If=$d_Found

#################################
# Enbeded Settings

<data> VarName=$CacheMateLog
[TfmCmateLog]
rbtLog.Checked=False
rbtNo.Checked=False
rbtNotes.Checked=True
rbtYes.Checked=True
rbtReplace.Checked=False
rbtAdd.Checked=True
rbtFlagNo.Checked=False
rbtFlagYes.Checked=True
rbtDateOnly.Checked=False
rbtDateTime.Checked=False
rbtUserNo.Checked=False
rbtUserYes.Checked=True
rbtCode.Checked=True
rbtSmart.Checked=False
<enddata>

Link to comment

When I run the cm2gpx.txt macro, I get the following error message

 

Error log: 2007-01-02 22:40:52

********************************************************************

 

Current Macro: C:\Program Files\GSAK\Macros\cm2gpx.txt

 

Error in Macro at line: 20

<data> VarName=$CacheMateLog

 

Error=> Macro error. "IF" command count = 0 but "ENDIF" count is 1

 

Macro will now abort

--------------------------------------------------------------------

Variables:

--------------------------------------------------------------------

*Active Table* = caches

$_Count (numeric) =3014

$_CurrentDatabase (string) =Pocket Queries

$_Degrees (numeric) =146,188785798607

$_Eol (boolean) =False

$_FilterCount (numeric) =0

$_Install (string) =C:\Program Files\GSAK

$_MacroLevel (numeric) =1

$_NewLine (string) =|

$_Quote (string) ="

$_SortBy (string) =code=D

$_Today (date) =[20070102]

$_Version (string) =6.6.4.20

 

Hope this helps!

Link to comment

OK, fixed the error in the macro. I forgot to delete all the EndIf statements.

That's what happens some times when cutting and pasting from another macro.... :laughing:

 

# Set System Variables

Set $Path=GetEnvv("HomeDrive")+GetEnvv("HomePath")

 

# Run CM2GPX - Converts Cachemate Database To GPX File

ShowStatus msg="Running Palm CM2GPX Converter"

RUNPGM pgm=$_Install\cm2gpx\cm2gpx.bat Wait=Yes

 

# Import Palm Cachemate Files - Found Caches And Logs

ShowStatus msg="Importing Palm Cachemate Files - Found Caches And Logs"

Macroset Dialog=CacheMateLog VarName=$CacheMateLog

CACHEMATE Settings=<macro> File=$_Install\cm2gpx\cm2gpx.gpx

 

# Display Found Caches

MFilter If=$d_Found

 

#################################

# Enbeded Settings

 

<data> VarName=$CacheMateLog

[TfmCmateLog]

rbtLog.Checked=False

rbtNo.Checked=False

rbtNotes.Checked=True

rbtYes.Checked=True

rbtReplace.Checked=False

rbtAdd.Checked=True

rbtFlagNo.Checked=False

rbtFlagYes.Checked=True

rbtDateOnly.Checked=False

rbtDateTime.Checked=False

rbtUserNo.Checked=False

rbtUserYes.Checked=True

rbtCode.Checked=True

rbtSmart.Checked=False

<enddata>

Link to comment

When you load the cm2gpx.gpx file, are you using the File=>Load CacheMate logs and finds? Or are you just loading it like a "normal" .gpx file? Using the first method will update the UserNote and Found info, and can match by either GC**** or smartnames.

 

That fixed it, I did the Load CacheMate Logs & finds and it didn't duplicate as I've mentionned before. However, I still can't understand why my finds only say 316 instead of 322. I still have to wait a few days before I can run the PQ again.

 

On that same note... How do I delete or isolate from the rest of the cachemate database the ones marked as found?

Link to comment

Almost everything in GSAK is done via filters. To remove found caches, set a filter that excluded found caches. I have a saved filter named 'Huntable' that excludes found, archived, disabled caches, and some others I don't want to bother with. I load it every time I run GSAK. I also have others, and you can do lots of stuff with filters.

Link to comment

However, I still can't understand why my finds only say 316 instead of 322. I still have to wait a few days before I can run the PQ again.

 

On that same note... How do I delete or isolate from the rest of the cachemate database the ones marked as found?

 

It sounds like you have multiple finds for some caches and GSAK is not picking them up. In order for GSAK to count multiple finds:

 

1. Your GSAK database is being updated with GPX files from gc.com (not loc files)

2. You tell GSAK correctly how to match your found logs.

 

To get item 2 correct make sure you have the "method for matching hidden and found" caches filled out correctly (Tools=>Options=>General). For more information see the help file or view this section online here http://www.gsak.net/help/hs7690.htm

 

Once correct, do a "Database=>Repair/Defrag" to force GSAK to resync your database and found counts.

Link to comment

Here is the next step.

This macro will do the following;

 

1) Filter all Found caches

2) Copy the UserNotes from each found cache (one at a time) to the Windows clip board.

3) Open the individual logging page for the found caches (one at a time).

4) At this point you paste the UserNotes data into the Comments section of the Geocaching logging screen. 5) You then select "Found It" from the drop down. Then click on the "Submit log entry".

6) Next you'll go back to GSAK and click on the Continue button.

7) The process runs step 2 - step 6 for each of your found caches.

8) Once all the caches have been logged on Geocaching.com the next time you click on Continue, the macro will move all the found caches to the Found database.

 

NOTE: If you do not want the macro to move the found caches to the found database it is easy to remove that function from the macro. The macro could be modified to delete the found cache after all have been logged.

 

#####################################################################
# Semi-Automatic Log Found Caches On Geocaching.com
# Once All Found Caches Are Logged Move Found Caches To Found Database
#####################################################################

# Select Database
$Database = "Any string we know won't match a file name"
While .not. DatabaseExists($Database)
INPUT Msg="Enter the Database name that you want to move the Found Caches From." Default=$_CurrentDatabase VarName=$Database
If DatabaseExists($Database)
Database name=$Database Action=select
Else
Pause Msg="Database does not exist. Please try again"
EndIf
EndWhile

# Filter Found Caches
MFilter If=$d_Found
SORT By=Foundbyme;Usersort sequence=D
IF $_FilterCount > 0
GoTo Position=Top
While .not. $_eol
Else
ShowStatus msg="No Caches Marked As Found"

# Open Selected Database And Clear All User Flags
Database Name=$_CurrentDatabase Action=Select
USERFLAG type=clear range=all
VIEW name="Home"
SORT By=Distance Sequence=A
Center Location="Home"
Cancel
ENDIF

# Copy contents of the log section of the notes for this cache into the clipboard
$LogData = $d_UserNote
$ClipData = $LogData
CLIP tags=$ClipData

# Call up the log page for this cache (press Ctrl-V to paste GSAK info the log box)
WEB url="http://www.geocaching.com/seek/log.aspx?ID=%gcid"
	Pause msg="When your finished logging, click on continue"
	GoTo Position=next
EndWhile
GoTo Position=Top

# Move Found Caches From Selected Database To Found Database
ShowStatus msg="Moving Found Caches To Found Database"
Database Name=$Database Action=Select
MFilter If=$d_Found
IF $_FilterCount > 0
  	Macroset Dialog=MoveCopy VarName=$MoveCopy
MoveCopy Settings=<macro>
ENDIF

########################################################################
# Enbeded Settings

<data> VarName=$MoveCopy
[TfmMove]
cbxDestination.Text=Found
rbtAdd.Checked=True
rbtAddFlag.Checked=False
rbtAddIgnore.Checked=False
rbtCopy.Checked=False
rbtExistIgnore.Checked=False
rbtFlagOnly.Checked=False
rbtMove.Checked=True
rbtReplace.Checked=True
rbtReplaceFlag.Checked=False
chkDisplay.Checked=True
<enddata>

Link to comment

Almost everything in GSAK is done via filters. To remove found caches, set a filter that excluded found caches. I have a saved filter named 'Huntable' that excludes found, archived, disabled caches, and some others I don't want to bother with. I load it every time I run GSAK. I also have others, and you can do lots of stuff with filters.

 

The found caches that I want to remove is not in GSAK it's in cachemate. I delete the found category but that doesn't clear up the caches that have the found box checked.

Link to comment

There are two way you can do this.

 

Delete all the cache from your main Cachemate Category. if that doesn't work for you, you'll need to open each of your found caches individually then click on the menu and select delete.

 

The other thing you may want to do is set Cachemate so that when you check a cache as found it will move the cache from your main category to the Found catagory. To do this open Cachemate, then open a cache. Open the menu then go to Option then go to View Options, Check the box that says Set Category Found.

Then once you are done with your found caches you can go to the Found category select the menu and select Delete Records.

Link to comment

However, I still can't understand why my finds only say 316 instead of 322. I still have to wait a few days before I can run the PQ again.

 

On that same note... How do I delete or isolate from the rest of the cachemate database the ones marked as found?

 

It sounds like you have multiple finds for some caches and GSAK is not picking them up. In order for GSAK to count multiple finds:

 

1. Your GSAK database is being updated with GPX files from gc.com (not loc files)

2. You tell GSAK correctly how to match your found logs.

 

To get item 2 correct make sure you have the "method for matching hidden and found" caches filled out correctly (Tools=>Options=>General). For more information see the help file or view this section online here http://www.gsak.net/help/hs7690.htm

 

Once correct, do a "Database=>Repair/Defrag" to force GSAK to resync your database and found counts.

Link to comment

However, I still can't understand why my finds only say 316 instead of 322. I still have to wait a few days before I can run the PQ again.

 

On that same note... How do I delete or isolate from the rest of the cachemate database the ones marked as found?

 

It sounds like you have multiple finds for some caches and GSAK is not picking them up. In order for GSAK to count multiple finds:

 

1. Your GSAK database is being updated with GPX files from gc.com (not loc files)

2. You tell GSAK correctly how to match your found logs.

 

To get item 2 correct make sure you have the "method for matching hidden and found" caches filled out correctly (Tools=>Options=>General). For more information see the help file or view this section online here http://www.gsak.net/help/hs7690.htm

 

Once correct, do a "Database=>Repair/Defrag" to force GSAK to resync your database and found counts.

 

Ok now I'm a bit confused. Here's the problem. I didn't log any more caches since MYFinds PQ ran and showed322 waypoints. a week ago. At that time, when I loaded the GPX file in GSAK, my database showed 316 finds. Today, seven days later, when I was able to run the PQ again, it still showed 322 waypoints but now my GSAK database shows 323 found caches. The GC.com websites shows that I have 322 finds.

 

I looked into the option above, selected «exact match» and did a defrag. GSAK still shows 323 finds.

 

I don't know what a «multiple find» is

Link to comment
GSAK database shows 323 found caches. The GC.com websites shows that I have 322 finds.

 

What this means is that at some stage you probably logged a find on a cache more than once, but then deleted it. Unfortunately the "Delete" action is not reflected in the GPX file so GSAK still has one more found log in the database than the "My Finds" PQ.

 

However, this is quite easy to remedy. Please see this post

Link to comment

When I set the Found to «greater than or equal to: 2» It seems as thought the filter doesn't operate. The filter menu remains on screen and the results shown are the same as if I clear all tabs of the filter menu.

 

Should I delete the whole database and reload the PQ's?

Link to comment

:laughing: Hooray! it worked!

To recap...

1.Log finds in PDA

2.Check found box and mark time

3.Hotsync PDA

4.Run cm2gpx macro

5.File>Load cachemate logs & finds

6.Run>Semi-Automatic Log Found Caches On Geocaching.com

 

I almost hate to ask... Is there a way to tie it all (step4,5,6) together in one step? There was an earlier mention of a Macro Button. Would that work?

Link to comment

Yes you can combine the two macros together, or you can add an additional code at the end of the CM2GPX macro that will give you a choice to run the semi-auto logging macro.

 

See this post Add GSAK Macro Button

 

If you want to add the code to the end of the CM2GPX macro add the following

 

Choose msg="Bulk Log found caches now?" opt1=No opt2=Yes
If $Result = 1
Cancel
EndIf
If $Result = 2
Macro File=$_Install\Macros\<Name Of Your Semi-Auto Logging Macro>
EndIf

Link to comment

When I accept the bulk log option I get the following message:

 

«Current Macro: C:\Program Files\GSAK\Macros\cm2gpx.txt

 

Error in Macro at line: 42

Macro File=$_Install\Macros\log_on_gccom

 

Error=> C:\Program Files\GSAK\Macros\log_on_gccom

Macro file does not exist

 

Macro will now abort»

 

log_on_gccom is the name I gave to the macro file. This file is located in: C:\Program Files\GSAK\Macros\log_on_gccom

Link to comment

Hey N8OFP - Del,

 

Care to help out another newbie?

 

I have been following along. Here is what I do:

 

1. Mark caches as found in CacheMate

2. Hotsync Palm

3. Run CacheMateLog.txt macro

4. Log each cache and then hit CONTINUE

 

After the last one is logged, I get this error:

 

********************************************************************

Error log: 1/9/2007 10:38:26 PM

********************************************************************

 

Current Macro: C:\Program Files\GSAK\Macros\CacheMateLog.txt

 

Error in Macro at line: 201

MOVECOPY Settings="$movecopysettings"

 

Error=> Settings not found: Found

 

Macro will now abort

--------------------------------------------------------------------

Variables:

--------------------------------------------------------------------

*Active Table* = caches

$_Count (numeric) =2

$_CurrentDatabase (string) =Default

$_Degrees (numeric) =343.072359943808

$_Eol (boolean) =True

$_FilterCount (numeric) =2

$_Install (string) =C:\Program Files\GSAK

$_MacroLevel (numeric) =1

$_NewLine (string) =|

$_Quote (string) ="

$_SortBy (string) =FoundByMe;UserSort=A

$_Today (date) =[20070109]

$_Version (string) =6.6.4.20

$CacheMateLog (string) =[TfmCmateLog]|rbtLog.Checked=True|rbtNo.Checked=False|rbtNotes.Checked=False|rbtYes.Checked=True|File1.Filename=|rbtReplace.Checked=True|rbtAdd.Checked=False|rbtFlagNo.Checked=False|rbtFlagYes.Checked=True|rbtDateOnly.Checked=False|rbtDateTime.Checked=False|rbtUserNo.Checked=False|rbtUserYes.Checked=True|rbtCode.Checked=True|rbtSmart.Checked=False|

$cm2gpx (string) =C:\Program Files\GSAK\cm2gpx\cm2gpx.exe

$cm2options (string) =-f

$cmd (string) =cmd.exe

$cmsettings (string) =

$currentdb (string) =Default

$currentfilter (string) =ValidFilteSave=Yes|NameS=|CodeS=|SavedFilter=|Mfilter=False|LastFilter=("T" $ QkeyVal("UserFlag"))|StatusBar= Subset: None |FilterSet=False|

$currentsort (string) =distance=A

$database (string) =Default

$datafile (string) =C:\Program Files\GSAK\Macros\Logem.dat

$datafilepath (string) =C:\Program Files\GSAK\Macros

$findsgpx (string) =C:\Program Files\GSAK\temp\finds.gpx

$Line (string) =Default;C:\Program Files\GSAK\cm2gpx\cm2gpx.exe;-f;;C:\Program Files\palmOne\DM\Backup\DefaultItems-cMat.PDB;1;Found

$movecopysettings (string) =Found

$movefinds (string) =1

$pdbfile (string) =C:\Program Files\palmOne\DM\Backup\DefaultItems-cMat.PDB

$tmppath (string) =C:\Program Files\GSAK\temp

$url (string) =http://www.geocaching.com/seek/log.aspx?ID=226895

 

Any ideas?

Link to comment
When I accept the bulk log option I get the following message:

 

«Current Macro: C:\Program Files\GSAK\Macros\cm2gpx.txt

 

Error in Macro at line: 42

Macro File=$_Install\Macros\log_on_gccom

 

Error=> C:\Program Files\GSAK\Macros\log_on_gccom

Macro file does not exist

 

Macro will now abort»

 

log_on_gccom is the name I gave to the macro file. This file is located in: C:\Program Files\GSAK\Macros\log_on_gccom

This error is because your file name is incorrect and GSAK can't find it. You need to add the file extension to the end of your macro name. Change the

Macro File=$_Install\Macros\log_on_gccom
to

 

Macro File=$_Install\Macros\log_on_gccom.txt

Link to comment

markz68

 

The error your seeing below says you don't have a database called Found. The macro was written to move all the caches in which the Found box was checked to the Found database after the last one was logged on GC.com.

 

********************************************************************

Error log: 1/9/2007 10:38:26 PM

********************************************************************

 

Current Macro: C:\Program Files\GSAK\Macros\CacheMateLog.txt

 

Error in Macro at line: 201

MOVECOPY Settings="$movecopysettings"

 

Error=> Settings not found: Found

 

Macro will now abort

 

Theew are two ways to fix this issue.

 

1) Create a new database by clicking on Database then clicking on New. Name the database Found

 

2) If you don't want a seperate database for the caches you have found then remove the following lines of code from your CacheMateLog.txt macro.

 

# Move Found Caches From Selected Database To Found Database

ShowStatus msg="Moving Found Caches To Found Database"

Database Name=$Database Action=Select

MFilter If=$d_Found

IF $_FilterCount > 0

Macroset Dialog=MoveCopy VarName=$MoveCopy

MoveCopy Settings=<macro>

ENDIF

 

If you think that some time in the future your may want to use this feature your can remark out this portion of the macro code by placing a # in front of each line. This will cause the macro to skip this section.

 

# Move Found Caches From Selected Database To Found Database

#ShowStatus msg="Moving Found Caches To Found Database"

#Database Name=$Database Action=Select

#MFilter If=$d_Found

#IF $_FilterCount > 0

#Macroset Dialog=MoveCopy VarName=$MoveCopy

#MoveCopy Settings=<macro>

#ENDIF#

Link to comment

markz68

 

The error your seeing below says you don't have a database called Found. The macro was written to move all the caches in which the Found box was checked to the Found database after the last one was logged on GC.com.

 

********************************************************************

Error log: 1/9/2007 10:38:26 PM

********************************************************************

 

Current Macro: C:\Program Files\GSAK\Macros\CacheMateLog.txt

 

Error in Macro at line: 201

MOVECOPY Settings="$movecopysettings"

 

Error=> Settings not found: Found

 

Macro will now abort

 

Theew are two ways to fix this issue.

 

1) Create a new database by clicking on Database then clicking on New. Name the database Found

 

2) If you don't want a seperate database for the caches you have found then remove the following lines of code from your CacheMateLog.txt macro.

 

# Move Found Caches From Selected Database To Found Database

ShowStatus msg="Moving Found Caches To Found Database"

Database Name=$Database Action=Select

MFilter If=$d_Found

IF $_FilterCount > 0

Macroset Dialog=MoveCopy VarName=$MoveCopy

MoveCopy Settings=<macro>

ENDIF

 

If you think that some time in the future your may want to use this feature your can remark out this portion of the macro code by placing a # in front of each line. This will cause the macro to skip this section.

 

# Move Found Caches From Selected Database To Found Database

#ShowStatus msg="Moving Found Caches To Found Database"

#Database Name=$Database Action=Select

#MFilter If=$d_Found

#IF $_FilterCount > 0

#Macroset Dialog=MoveCopy VarName=$MoveCopy

#MoveCopy Settings=<macro>

#ENDIF#

 

I must have a different version of the macro than you, because I don't have that section to delete or comment out.

 

And I do have a "found database".

 

Here is the version number from the beginning of my macro which I just downloaded last night using your link.

 

CacheMateLog.txt v1.6-20060425

Link to comment

The easiest way to figure this out would be for you to open the macro file, copy and paste it here. That way I can see what your macro is doing.

 

#############################################

# CacheMateLog.txt v1.6-20060425

# by Pasha Phares

# REQUIRES: GSAK V6.6.1.14 or higher

#

# Macro to get the latest copy of Cachemate's

# backup database, extract the finds, update

# the local copy, then sequentially (by found

# date and distance from home) open the

# GC.com logging page with the user notes

# from the local record copied into the

# clipboard. Once logging is complete, finds

# are moved to another database if the user

# has defined that.

#

# REQUIRED: nothing. GSAK has added features

# that allow the macro to take care of every-

# thing for you. :laughing:

#

# Optional: If you have want to move or copy

# your found caches to a different database

# after logging them, you need to have saved

# settings in the Move/Copy Waypoints dialog

# and be prepared to specify that saved set-

# ting name.

#

# The default behavior of the CacheMate

# import is to prefix the log with the log

# time (allowing you to log in the order in

# which you found), to place the CacheMate

# data in the User Log field, to Replace

# existing logs, to put the YYYYMMDD into the

# User Sort field, and to match cache records

# using the GCxxxx code. If you want to

# change these things, you can do so, but

# your settings MUST have "Set user flag if

# updated?" checked... else you'll be logging

# ALL of your finds, past and present, every

# time you run it.

#############################################

#

#############################################

# Usage: 1)Sync your Palm device to make a

# backup copy of your CacheMate DB.

# 2)Run this macro

#############################################

#

# Uncomment below line to turn debugging on

#Debug Status=On

 

# Version check

VERCHECK Version=6.6.1.14 (You can find the latest version of GSAK in the forums at http://support.gsak.net/.)

 

# Set the name of the command interpreter.

# The default is for WinXP, but it may also

# be "command.com", etc. for older Windows

# versions.

$cmd = "cmd.exe"

 

# Save various settings for restoration later

DATASAVE Data=$d_UserFlag

$currentsort = $_SortBy

$currentfilter = SAVEFILTER()

 

# Set and validate some file paths

$datafilepath = $_Install + "\Macros"

IF NOT (FolderExists($datafilepath))

CANCEL Msg="FAILURE: You don't have a Macros folder in your GSAK install directory! Where did you put this macro? Create one, put this macro there, and restart it."

ENDIF

$datafile=$datafilepath + "\Logem.dat"

$tmppath = $_Install + "\temp"

IF NOT (FolderExists($tmppath))

CANCEL Msg="FAILURE: No temporary folder found in your GSAK install directory! This macro needs a folder called 'tmp' in $_Install. Create one and restart this macro."

ENDIF

$findsgpx=$tmppath + "\finds.gpx"

 

# Get rid of findsgpx if it already exists

IF (FileExists($findsgpx))

RUNPGM Pgm=$cmd Parms=/C del "$findsgpx"

ENDIF

 

# Clear all user flags

USERFLAG Type=clear Range=All

 

# Does the datafile already exist?

IF (FileExists($datafile))

 

# Yes? Read config values and assign to our vars

FILEREAD File=$datafile

$database=EXTRACT($line, ";", 1)

$cm2gpx=EXTRACT($line, ";", 2)

$cm2options=EXTRACT($line, ";", 3)

$cmsettings=EXTRACT($line, ";", 4)

$pdbfile=EXTRACT($line, ";", 5)

$movefinds=EXTRACT($line, ";", 6)

$movecopysettings=EXTRACT($line, ";", 7)

ENDREAD

 

ELSE

 

# No? Then we have to ask for the various values and check to see if they're valid.

 

# Database to which to import finds

$database="Default"

$inputmsg="Enter the name of the database TO WHICH to import finds from Cachemate."

INPUT Msg="$inputmsg" Default="$database" Varname=$database

WHILE NOT (DataBaseExists($database))

$inputmsg="That database doesn't exist! Enter a valid database name:"

INPUT Msg="$inputmsg" Default="$database" Varname=$database

ENDWHILE

 

# Location of cm2gpx.exe

$cm2gpx=$_Install + "\cm2gpx.exe"

WHILE NOT (FileExists($cm2gpx))

$inputmsg=$cm2gpx + " not found." + $_NewLine + "Enter fully-qualified path to CM2GPX.exe"

INPUT Msg="$inputmsg" Default="$cm2gpx" Varname=$cm2gpx

ENDWHILE

 

# cm2gpx.exe command line options

$cm2options="-f"

$inputmsg="Enter cm2gpx.exe command-line options." + $_NewLine + $_NewLine + "The default (-f) is to only import records with the 'Found' box checked. See the cm2gpx help for more information."

INPUT Msg="$inputmsg" Default="$cm2options" Varname=$cm2options

 

# CacheMate dialog saved settings; if specified, we'll use them instead of the defaults

$inputmsg="Enter name of saved CacheMate import settings." + $_NewLine + $_NewLine + "LEAVE THIS BLANK unless you've read the help text at the beginning of the macro and know what you're doing!"

INPUT Msg="$inputmsg" Default="" Varname=$cmsettings

 

# Cachemate database backup file to grab finds from

$pdbfile="C:\Program Files\palmOne\[YOUR PALM USERNAME]\Backup\DefaultItems-cMat.PDB"

$inputmsg="Cachemate database file to grab finds from:" + $_NewLine + $_NewLine + "(At the least, change [YOUR PALM USERNAME] to match your Palm username (and this is likely only the first 6 characters of the name); if needed, change the whole string to match the PDB file to use.)"

INPUT Msg="$inputmsg" Default="$pdbfile" Varname=$pdbfile

WHILE NOT (FileExists($pdbfile))

$inputmsg="No such file exists!" + $_NewLine + "(At least, change [YOUR PALM USERNAME] to match the first six characters of your Palm username; if needed, change the whole string to match the PDB file to use.)" + $_NewLine + $_NewLine + "(My Palm username is 'Chromag', so my entry here reads 'C:\Program Files\PalmOne\Chroma\Backup\DefaultItems-cMat.pdb'.)"

INPUT Msg="$inputmsg" Default="$pdbfile" Varname=$pdbfile

ENDWHILE

 

# Whether or not to move Found caches to a separate database by default

$inputmsg="Shall Found caches be moved to a separate database after logging?"

CHOOSE Msg=$inputmsg opt1="Yes" opt2="No"

$movefinds=NumToStr($Result)

 

# If yes, get the Move/Copy saved settings name

IF $movefinds="1"

$movecopysettings="Found"

$inputmsg="Move/Copy saved settings name:"

INPUT Msg=$inputmsg Default="$movecopysettings" Varname=$movecopysettings

ELSE

$movecopysettings=""

ENDIF

 

# Now save all those values for next time into $datafile, separated by ;

$vars=$database + ";" + $cm2gpx + ";" + $cm2options + ";" + $cmsettings + ";" + $pdbfile + ";" + $movefinds + ";" + $movecopysettings

$fileoutput=PUTFILE($datafile, $vars)

IF Left($fileoutput, 7) = "*Error*"

CANCEL Msg="FAILURE: Unable to write to $datafile!"

ENDIF

 

# End "No $datafile" IF

ENDIF

 

# Whew. Now we can actually do something with all those vars:

 

# Select the database if it isn't already

$currentdb = $_CurrentDatabase

IF $currentdb <> $database

DATABASE Name="$database" Action=Select

ENDIF

 

# Run cm2gpx.exe to create $findsgpx

RUNPGM Pgm=$cm2gpx Parms=$cm2options -o "$findsgpx" "$pdbfile" Wait=Yes

 

# Make sure findsgpx exists before continuing

IF NOT (FileExists($findsgpx))

PAUSE Msg="FAILURE: $findsgpx does not exist! Verify that your Cachemate backup database is in the right place and contains caches marked as found. Note that you'll need to edit or delete the file $datafile in order to change your previously-specified values."

ELSE

 

# Import $findsgpx into GSAK using user settings if they exist; else use defaults

IF IsEmpty($cmsettings)

MACROSET Dialog=CacheMateLog VarName=$CacheMateLog

CACHEMATE Settings=<macro> File="$findsgpx"

ELSE

CACHEMATE Settings=$cmsettings File="$findsgpx"

ENDIF

 

# Filter so our list is only new finds using the UserFlag set during Cachemate import

MFILTER IF=$d_UserFlag

 

# If there's records in the filter, sort 'em and log 'em, pausing between each for the user to confirm.

IF $_FilterCount > 0

SORT By="FoundByMe;UserSort"

GOTO Position=Top

WHILE NOT ($_EOL)

CLIP Tags="%UserLog"

$url = "http://www.geocaching.com/seek/log.aspx?ID=%gcid"

WEB Url=$url

PAUSE Msg="Click Continue when logged successfully."

GOTO Position=Next

ENDWHILE

# Move Finds to separate DB if user has specified that

IF $movefinds="1"

MOVECOPY Settings="$movecopysettings"

ENDIF

ELSE

PAUSE Msg="No found caches in filter! Clearing and exiting."

ENDIF

ENDIF

 

# Done with everything. Remove the GPX file.

RUNPGM Pgm=$cmd Parms=/C del "$findsgpx"

 

# Clear temporary filter and user flags

CANCELFILTER

USERFLAG Type=clear Range=All

 

# Return to original database, if different

IF $_CurrentDatabase <> $currentdb

DATABASE Name=$currentdb Action=select

ENDIF

 

# Restore userflags, filter, and sort

DATARESTORE Data=$d_UserFlag

IF RESTOREFILTER($currentfilter, True) = 0

PAUSE Msg="Previously-set filter now would show no records. Clearing."

ENDIF

$sortdata = Extract($currentsort, "=",1)

$sequence = Extract($currentsort, "=",2)

SORT By=$sortdata Sequence=$sequence

 

<data> VarName=$CacheMateLog

[TfmCmateLog]

rbtLog.Checked=True

rbtNo.Checked=False

rbtNotes.Checked=False

rbtYes.Checked=True

File1.Filename=

rbtReplace.Checked=True

rbtAdd.Checked=False

rbtFlagNo.Checked=False

rbtFlagYes.Checked=True

rbtDateOnly.Checked=False

rbtDateTime.Checked=False

rbtUserNo.Checked=False

rbtUserYes.Checked=True

rbtCode.Checked=True

rbtSmart.Checked=False

<enddata>

Link to comment

markz68

 

I have an idea of what maybe the issue your seeing.

I think that as you were going though the setup of the macro variables the first time you ran the macro there was a problem with some of the information entered.

 

Please do the following.

 

1) Double click on My Computer

2) Double click on the C Drive

3) Double click on Program Files

4) Double click on GSAK

5) Double click on Macros

6) Double click on the Logem.dat file

7) Copy the contents of that file and paste it here.

 

I also need to know the name of the database you want to copy your found / logged file into. Make sure it is spelled just like it appears in the GSAK Database dropdown...

Link to comment

markz68

 

I have an idea of what maybe the issue your seeing.

I think that as you were going though the setup of the macro variables the first time you ran the macro there was a problem with some of the information entered.

 

Please do the following.

 

1) Double click on My Computer

2) Double click on the C Drive

3) Double click on Program Files

4) Double click on GSAK

5) Double click on Macros

6) Double click on the Logem.dat file

7) Copy the contents of that file and paste it here.

 

I also need to know the name of the database you want to copy your found / logged file into. Make sure it is spelled just like it appears in the GSAK Database dropdown...

 

Here is the logem.dat

 

Default;C:\Program Files\GSAK\cm2gpx\cm2gpx.exe;-f;;C:\Program Files\palmOne\DM\Backup\DefaultItems-cMat.PDB;1;Found

 

The database is called Found

Link to comment

markz68

 

OK, I figured it out. Helps to read the entire instructions before trying the macro... :laughing:

 

What you need to do is;

 

1) Click on Database

2) Click on Move / Copy Waypoints...

3) Set the Destintion database to Found

4) Set Move or Copy Waypoints? to Move

5) Set If waypoint already exists in the Destination Database to Replace

6) Set If waypoint does NOT exist in the destination database? to Add

7) Click on the Save button

8) Enter Found in the Enter a name for these settings field.

9) Click on OK.

 

Now run your macro. It should now run correctly.

Link to comment

markz68

 

OK, I figured it out. Helps to read the entire instructions before trying the macro... :)

 

What you need to do is;

 

1) Click on Database

2) Click on Move / Copy Waypoints...

3) Set the Destintion database to Found

4) Set Move or Copy Waypoints? to Move

5) Set If waypoint already exists in the Destination Database to Replace

6) Set If waypoint does NOT exist in the destination database? to Add

7) Click on the Save button

8) Enter Found in the Enter a name for these settings field.

9) Click on OK.

 

Now run your macro. It should now run correctly.

 

Works like a champ now! Thanks for holding my hand! I appreciate your help!

Link to comment

Wow! What a thread so must add to it.

 

I do all of that said but don't get a cm2gpx.gpx file created. I deleted all caches in CacheMate except those in the found category and inside backup my updated file is called MainItems-cMat.PDB and it only contains found caches. The noted macro (run convert and also import to GSAK) says no gpx found which is correct, a gpx isn't created.

 

Here is my BAT

 

C:\Program Files\GSAK\cm2gpx\cm2gpx.exe -f -o C:\Program Files\GSAK\cm2gpx\cm2gpx.gpx C:\Program Files\palmOne\Bill\Backup\MainItems-cMat.PDB

 

?

 

Tks

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...