Page 1 of 1

GSAK Macros

Posted: Tue May 17, 2005 12:12 pm
by TeamJnJ
Anyone use 'em? Know how to write 'em?

This is what I'd like to do, but can't figure it out from the documentation:

I'd like to write a macro which will, at a button click, filter and show only virtuals, and then save them to a MS Streets and Trips .csv file (automatically replacing the existing file). Does anyone know how to do this?

Then I would do the same with Traditionals, Multis, and Mystery caches. When I import each individual file into MS Streets and Trips, I can easily change the color of the pushpins so I know at a glance what type of cache I'm near.

Also, if you know of any other neat tips/tricks using GSAK, share the wealth!

Thanks!
J&J :-D

Posted: Tue May 17, 2005 1:33 pm
by Fritz_Monroe
If you come up with this, how abotu writing it up and adding it to the MGS library?

Have you looked for this in the gc.com forums? If it's been discussed, that's where it would be.

F_M

Posted: Tue May 17, 2005 2:31 pm
by TeamJnJ
Thanks, I'll do that. I may also contact GLM. He seems to be expert with GSAK.

Posted: Tue May 17, 2005 4:28 pm
by jpatton
I've started playing around with the macros in GSAK lately. They really aren't hard to make up. I'll play around with it tonight when I get home and see what I can come up with.

Posted: Tue May 17, 2005 4:35 pm
by vyper4
try this:

Step 1) Create a filter for the Virtuals you want to see and save it, I call mine virtual

Step 2) Export the filter output, save the export settings, again I call mine virtual

Step 3) Build this macro

SET $CurrentData = $_CurrentDatabase
USERFLAG Type=clear Range=all
DATABASE Name="$CurrentData"
FILTER Name="virtual"
EXPORT Type=SNT Settings="virtual"

Step 4) Repeat the process for each type, I think it can be done in one macro, though I have not tried.

SET $CurrentData = $_CurrentDatabase
USERFLAG Type=clear Range=all
DATABASE Name="$CurrentData"
FILTER Name="virtual"
EXPORT Type=SNT Settings="virtual"
FILTER Name="traditional"
EXPORT Type=SNT Settings="traditional"


Good luck

Posted: Tue May 17, 2005 5:12 pm
by TeamJnJ
Wow...that works like a charm! I put everything into one macro file, assigned it a button, pressed the button, and suddenly all the work that had taken me 10 minutes is done in 30 seconds! This is the result after importing into MS Streets and Trips - zoomed in on the Metro region:

Image


Red = Traditionals
Blue = Mystery
Purple = Virtuals
Yellow = Multis
Green = My Finds

Cool, huh?
Thanks for the code! 8) [/img]

Posted: Tue May 17, 2005 5:56 pm
by GoGayleGo
vyper4 wrote:Step 3) Build this macro

SET $CurrentData = $_CurrentDatabase
USERFLAG Type=clear Range=all
DATABASE Name="$CurrentData"
FILTER Name="virtual"
EXPORT Type=SNT Settings="virtual"
Where exactly do you do this? In GSAK? If so, on what screen?

Posted: Tue May 17, 2005 6:12 pm
by SnaggleT
Yes - Please tell us more for the beginners

Posted: Tue May 17, 2005 6:20 pm
by DasheyFam
That's great! My only suggestion is to "rip off" the GC icons to use with S&T. When I'm up for "serious" caching, I always use their icons so I know exactly what I'm looking for.

One question with that macro, though: Can you set it up so the HTML export will work properly also? I suppose you would need several HTML subdirectories, but this problem has been the main reason I haven't created my own GSAK macro like the one posted here. Anyone want to save me a few brain cells and point me in the right direction?

Posted: Tue May 17, 2005 6:48 pm
by vyper4
GoGayleGo wrote:Where exactly do you do this? In GSAK? If so, on what screen?
In GSAK --> Macro --> Edit/Create

Posted: Tue May 17, 2005 6:51 pm
by vyper4
DasheyFam wrote:Can you set it up so the HTML export will work properly also?
What is wrong with the HTML export?

Posted: Tue May 17, 2005 9:02 pm
by gwalt3
vyper4, great work, thanks for the post.

I am liking GSAK more and more. Just wish I had some time during the week to play around with all its features.

Posted: Tue May 17, 2005 11:03 pm
by DasheyFam
vyper4 wrote:
DasheyFam wrote:Can you set it up so the HTML export will work properly also?
What is wrong with the HTML export?
I would assume that each filter would have to do its own HTML export so that S&T would recognize the links properly. (My problem is keeping GSAK from overwriting the caches in the subdirectory each time a new filter exports in HTML format.) Is this making any sense?

Maybe I'm too tired to explain it properly tonight. . . :smt015