View unanswered posts | View active topics It is currently 18 December 17 12:42 am



Post new topic Reply to topic  [ 3 posts ] 
A question for the GSAK gurus 
Author Message
6500 or more caches found
6500 or more caches found
User avatar

Joined: 11 February 07 9:53 pm
Posts: 1904
GCA Found: 123
GCA Hidden: 0
100 GCA Finds
Post A question for the GSAK gurus
I use the following macro fairly regularly, it is one I butchered from a Kai Team macro.

What I would love to be able to do is have a pop up box that I could enter coordinates for a polygon to return just caches within the polygon that meet the requirements for the macro.

Code:
#*******************************************
# MacDescription = Find not found, available plus "solved" mysteries within XXXkm
# MacFileName = Findable Caches BMS Version.gsk
# MacAuthor = Big Matt (Edited from a KaiTeam base)
# MacVersion=1.2
# MacUrl=
#*******************************************
# The following macro will return caches that are available, have not been found and will
# only show puzzles if they have corrected coordinates. It is also set to only show caches
# within a 160km radius. If you find that this is too many for your GPS then change the
# $d_distance value.

MFILTER Expression=NOT($d_Found OR $d_Archived OR $d_TempDisabled OR IsOwner()) AND $d_Distance<160 AND $d_CacheType<>"U"
MFILTER Expression=$d_CacheType="U" AND $d_HasCorrected AND NOT($d_Found OR IsOwner OR $d_Archived OR $d_TempDisabled) AND $d_Distance<160 JOIN=OR


Any suggestions from the guru's out there as to if this is even possible? Currently I get around it by creating two filters and then using this bit of code to put them together but it is a bit of a pain... (sorry to all the experienced users for all my comments but a much smarter man than me once told me it is better to have lots of comments than have no idea what something does.)

Code:
#This joins the two custom filters.
# load first filter
FILTER name="Custom"
# load second filter
FILTER name="CustomCor" join=or
If $_FilterCount = 0
  Cancel Msg="Sorry, there are no records in your combined filters"
EndIf


01 November 11 2:45 pm
Profile E-mail WWW
10000 or more caches found
10000 or more caches found
User avatar

Joined: 13 October 03 11:45 am
Posts: 1067
Location: Travelling Australia using a Garmin Montana 650T
GCA Found: 6
GCA Hidden: 0
Post Re: A question for the GSAK gurus
Pointless Text Removed


Last edited by ian-and-penny on 03 November 11 2:22 pm, edited 1 time in total.



01 November 11 3:23 pm
Profile E-mail
10000 or more caches found
10000 or more caches found
User avatar

Joined: 13 October 03 11:45 am
Posts: 1067
Location: Travelling Australia using a Garmin Montana 650T
GCA Found: 6
GCA Hidden: 0
Post Re: A question for the GSAK gurus
Here's your starter: (download it from here PolygonFilter.gsk)
Code:
#*******************************************
# MacVersion = 1.0
# MacDescription = Polygon Filter
# MacAuthor = Ian (and Penny)
# MacFileName =PolygonFilter.gsk
# MacUrl =
#*******************************************

WHILE TRUE
   $FormExit = form($Form,"")
   BEGINCASE
      CASE $FormExit = "SystemExit"
      RETURN
      CASE $FormExit = "OK"
      BREAK
      CASE $FormExit = "Cancel"
      RETURN
   ENDCASE
ENDWHILE
MACROFLAG Type=Clear Range=All
$Data=getpolygon("j",$Polygon)
mfilter where=macroflag AND Found=0 AND Status='A' AND IsOwner=0 AND Not(CacheType='U' and HasCorrected=0)

<Data> VarName=$Polygon
Use format -dd mm.sss,ddd mm.sss
<EndData>

<Data> VarName=$form
Name = Form1
  Type = Form
  Height = 319
  Width = 321
Name = Polygon
  Type = Memo
  Height = 121
  Left = 32
  Top = 40
  Width = 241
  Taborder = 10
Name = Label1
  Type = Label
  Height = 17
  Left = 32
  Top = 16
  Width = 219
  Caption = Input polygon coordinates into the box below
Name = OK
  Type = Button
  Height = 25
  Left = 40
  Top = 184
  Width = 75
  Taborder = 11
  Caption = OK
Name = Cancel
  Type = Button
  Height = 25
  Left = 176
  Top = 184
  Width = 75
  Taborder = 12
  Caption = Cancel
<enddata>


01 November 11 8:55 pm
Profile E-mail
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Forum theme by Vjacheslav Trushkin for Free Forum/DivisionCore.