Jump to content

Gsak Mystats Makro


Recommended Posts

Hallo again,

my intention in my first posting was:

 

Who can rewrite the mentioned macro to produce the following output

 

Traditionals: 42,85%

Multis: 40,00%

Virtuals: 4,00%

Letterboxes: 0,45%

Events: 0,55%

Mysteries: 8,00%

Webcams: 0,47%

Locationless: 3,60%

Earth: 0,08%

Total: 3333 Caches = 100% dated 31-OCT-2005

 

Currently the macro does not work this way.

Edited by Vater und Sohn
Link to comment
Hallo again,

my intention in my first posting was:

 

Who can rewrite the mentioned macro to produce the following output

 

Traditionals: 42,85%

Multis: 40,00%

Virtuals: 4,00%

Letterboxes: 0,45%

Events: 0,55%

Mysteries: 8,00%

Webcams: 0,47%

Locationless: 3,60%

Earth: 0,08%

Total: 3333 Caches = 100% dated 31-OCT-2005

 

Currently the macro does not work this way.

I've played around with the code you mentioned and have come up with the following. There are no doubt many other ways to achieve the same result ;)
# Macro to show the % of cache types in current Database

$Total=$_Count
$temp = $_Install + "\temp"

# Set date format
Set $date = DateFormat($_Today)

mfilter if=$d_CacheType="B"
$LetterboxCount = ($_FilterCount/$Total) * 100
$LetterboxCount = left("$LetterboxCount",4)
CancelFilter

mfilter if=$d_CacheType="C"
$CitoCount = ($_FilterCount/$Total) * 100
$CitoCount = left("$LetterboxCount",4)
CancelFilter

mfilter if=$d_CacheType="E"
$EventCount = ($_FilterCount/$Total) * 100
$EventCount = left("$EventCount",4)
CancelFilter

mfilter if=$d_CacheType="G"
$BenchmarkCount= ($_FilterCount/$Total) * 100
$BenchMarkCount = left("$BenchMarkCount",4)
CancelFilter

mfilter if=$d_CacheType="L"
$LocationlessCount = ($_FilterCount/$Total) * 100
$LocationLessCount = left("$LocationlessCount",4)
CancelFilter

mfilter if=$d_CacheType="M"
$MultiCount = ($_FilterCount/$Total) * 100
$MultiCount = left("$MultiCount",4)
CancelFilter

mfilter if=$d_CacheType="O"
$OtherCount = ($_FilterCount/$Total) * 100
$OtherCount = left("$OtherCount",4)
CancelFilter

mfilter if=$d_CacheType="R"
$EarthCount = ($_FilterCount/$Total) * 100
$EarthCount = left("$EarthCount",4)
CancelFilter

mfilter if=$d_CacheType="T"
$TradCount = ($_FilterCount/$Total) * 100
$TradCount = left("$TradCount",4)
CancelFilter

mfilter if=$d_CacheType="U"
$UnknownCount = ($_FilterCount/$Total) * 100
$UnknownCount = left("$UnknownCount",4)
CancelFilter

mfilter if=$d_CacheType="V"
$VirtCount = ($_FilterCount/$Total) * 100
$VirtCount = left("$VirtCount",4)
CancelFilter

mfilter if=$d_CacheType="W"
$WebcamCount = ($_FilterCount/$Total) * 100
$WebCamCount = left("$WebCamCount",4)
CancelFilter

$out = "<html>" + $_NewLine
$out = $out + "<style type='text/css'>" + $_NewLine
$out = $out + "<!--" + $_NewLine
$out = $out + ".Body{font-family:'Arial'}" + $_NewLine
$out = $out + ".TableHeader{background-color:#CCCCFF;text-align: center}" + $_NewLine
$out = $out + ".Item{color:blue;font-weight:bold}" + $_NewLine
$out = $out + ".row{background-color: #FEF4D8;vertical-align:top}" + $_NewLine
$out = $out + "-->" + $_NewLine
$out = $out + "</style>" + $_NewLine
$out = $out + "<body class=body>" + $_NewLine
$out = $out + "<table border='1' summary=''>"
$out = $out + "<tr class=TableHeader><td align='center' colspan=2>Stats for Database: " + $_CurrentDatabase + "</td></tr>" + $_NewLine

$out = $out + "<tr class=row><td>Trad:</td><td>" +  "$TradCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Multi:</td><td>" +  "$MultiCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Virtual:</td><td>" +  "$VirtCount % </td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Letterbox:</td><td>" +  "$LetterboxCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Event:</td><td>" +  "$EventCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Unknown:</td><td>" +  "$UnknownCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Webcam:</td><td>" +  "$WebcamCount % </td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Locationless:</td><td> " + "$LocationlessCount %" + "</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Earth:</td><td>" +  "$EarthCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>CITO:</td><td>" +  "$CITOCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Benchmark:</td><td>" + "$BenchmarkCount %</td></tr>" +  $_NewLine
$out = $out + "<tr class=row><td>Other:</td><td>" +  "$OtherCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Total Waypoints</td><td>" + "$Total"+" = 100%" +" Dated "+"$Date</td></tr>" +  $_NewLine
$out = $out + "</table></body></html>"
$FileName = $temp + "\stats.htm"
$Error = PutFile($FileName,$out)
OpenFile file="$FileName"

 

HTH

Link to comment

Hallo Motley Crew

thank you for the code!

 

I changed this way:

 

# Macro to show the % of cache types in current Database

FILTER Name="My Found Caches (GSAK default)"
$Total=$_Count
$temp = $_Install + "\temp"

# Set date format
Set $date = DateFormat($_Today)

mfilter if=$d_CacheType="B".and.$d_found
$LetterboxCount = ($_FilterCount/$Total) * 100
$LetterboxCount = left("$LetterboxCount",4)

mfilter if=$d_CacheType="C".and.$d_found
$CitoCount = ($_FilterCount/$Total) * 100
$CitoCount = left("$CitoCount",4)

mfilter if=$d_CacheType="E".and.$d_found
$EventCount = ($_FilterCount/$Total) * 100
$EventCount = left("$EventCount",4)

mfilter if=$d_CacheType="G".and.$d_found
$BenchmarkCount= ($_FilterCount/$Total) * 100
$BenchMarkCount = left("$BenchMarkCount",4)

mfilter if=$d_CacheType="L".and.$d_found
$LocationlessCount = ($_FilterCount/$Total) * 100
$LocationLessCount = left("$LocationlessCount",4)

mfilter if=$d_CacheType="M".and.$d_found
$MultiCount = ($_FilterCount/$Total) * 100
$MultiCount = left("$MultiCount",4)

mfilter if=$d_CacheType="O".and.$d_found
$OtherCount = ($_FilterCount/$Total) * 100
$OtherCount = left("$OtherCount",4)

mfilter if=$d_CacheType="R".and.$d_found
$EarthCount = ($_FilterCount/$Total) * 100
$EarthCount = left("$EarthCount",4)

mfilter if=$d_CacheType="T".and.$d_found
$TradCount = ($_FilterCount/$Total) * 100
$TradCount = left("$TradCount",4)

mfilter if=$d_CacheType="U".and.$d_found
$UnknownCount = ($_FilterCount/$Total) * 100
$UnknownCount = left("$UnknownCount",4)

mfilter if=$d_CacheType="V".and.$d_found
$VirtCount = ($_FilterCount/$Total) * 100
$VirtCount = left("$VirtCount",4)

mfilter if=$d_CacheType="W".and.$d_found
$WebcamCount = ($_FilterCount/$Total) * 100
$WebCamCount = left("$WebCamCount",4)
CancelFilter

$out = "<html>" + $_NewLine
$out = $out + "<style type='text/css'>" + $_NewLine
$out = $out + "<!--" + $_NewLine
$out = $out + ".Body{font-family:'Arial'}" + $_NewLine
$out = $out + ".TableHeader{background-color:#CCCCFF;text-align: center}" + $_NewLine
$out = $out + ".Item{color:blue;font-weight:bold}" + $_NewLine
$out = $out + ".row{background-color: #FEF4D8;vertical-align:top}" + $_NewLine
$out = $out + "-->" + $_NewLine
$out = $out + "</style>" + $_NewLine
$out = $out + "<body class=body>" + $_NewLine
$out = $out + "<table border='1' summary=''>"
$out = $out + "<tr class=TableHeader><td align='center' colspan=2>My FoundStats for Database: " + $_CurrentDatabase + "</td></tr>" + $_NewLine

$out = $out + "<tr class=row><td>Traditional:</td><td>" +  "$TradCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Multi:</td><td>" +  "$MultiCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Virtual:</td><td>" +  "$VirtCount % </td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Letterbox:</td><td>" +  "$LetterboxCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Event:</td><td>" +  "$EventCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Unknown:</td><td>" +  "$UnknownCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Webcam:</td><td>" +  "$WebcamCount % </td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Locationless:</td><td> " + "$LocationlessCount %" + "</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Earth:</td><td>" +  "$EarthCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>CITO:</td><td>" +  "$CITOCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Benchmark:</td><td>" + "$BenchmarkCount %</td></tr>" +  $_NewLine
$out = $out + "<tr class=row><td>Other:</td><td>" +  "$OtherCount %</td></tr>" + $_NewLine
$out = $out + "<tr class=row><td>Total Waypoints</td><td>" + "$Total"+" = 100%" +" Dated "+"$Date</td></tr>" +  $_NewLine
$out = $out + "</table></body></html>"
$FileName = $temp + "\MyFoundStats.htm"
$Error = PutFile($FileName,$out)
OpenFile file="$FileName"

 

The Result:

 

My FoundStats for Database: Default

Traditional: 45.1 %

Multi: 29.0 %

Virtual: 4.51 %

Letterbox: 0.54 %

Event: 1.98 %

Unknown: 15.7 %

Webcam: 1.62 %

Locationless: 1.26 %

Earth: 0.18 %

CITO: 0 %

Benchmark: 0 %

Other: 0 %

Total Waypoints 554 = 100% Dated 21.12.2005

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...