Quantcast
Viewing all articles
Browse latest Browse all 75142

CopyFindNumberFromLogs by Bosn Ski - 2013-09-04

QUOTE (Kai Team @ June 20, 2012 08:00 pm)



2.  For the future, go to Macro>Edit/Create and copy the following code to the Macro Editor:

GSK
#*******************************************
# MacDescription =Update User Data with %count from publish logs
# MacFileName =FindNumtoUserData.gsk
# MacAuthor = Kai Team
# MacVersion=1.0
#*******************************************
IF Seek($_PublishCode)
   $Found = sqlite("sql","select g_FoundLog(Ltype) from LogsAll where rowid = $_PublishId2","")
   IF $Found = "1"
       $Count=PublishTags("%count")
       $d_UserData=$Count
  ENDIF
ENDIF

Go to File>Save in the macro editor and save the file with the name "FindNumtoUserData.gsk", without the quotes.

3. Go to Geocaching.com Access>Publish Logs, Settings tab and click the browse button (folder icon) next to "Macro to run for each log".  Browse to your GSAK\Macros folder, select the FindNumtoUserData.gsk macro, and click "Open".

4. On the Publish Logs, Settings tab, click the "Save" button and give these settings a name.

Now when you publish a log using these saved settings, the %Count number will automatically be copied to the User Data field and you will never have to manually update your find count again! Image may be NSFW.
Clik here to view.
smile.gif


PS - If you want to use one of the other User Data fields, just substitute $d_User2, $d_User3, or $d_User4 for $d_UserData above.

Edited to add:  ian-and-penny and I cross posted.  FYI, the advantage to using the method I described above is that it fully automates the updating of your find count - i.e. you never have to manually run another macro for this purpose once you've set things up. Image may be NSFW.
Clik here to view.
smile.gif


If you also want to automate moving your found caches to another database, you can use the same approach, using this macro code for the "Macro to run after all logs" on the Publish Logs, Settings tab:

GSK
MFILTER Where=Found
IF $_FilterCount>0
  MACROSET  Dialog=MoveCopy VarName=$MoveCopy
  MOVECOPY Settings=<macro>
ELSE
  CANCEL Msg="There are no found caches to move"
ENDIF

<data> VarName=$MoveCopy
[TfmMove]
cbxDestination.Text=Found by Me
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>


Note:  this macro assumes your found database is called "Found by Me".  If not, just substitute the name of your found database for "Found by Me" in the code above. Image may be NSFW.
Clik here to view.
wink.gif

KT,

Everything works except I get Message 176. Picture attached. I am not sure which macro it is referring to. Do you need me to post them?

Viewing all articles
Browse latest Browse all 75142

Trending Articles



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