Discussion about software such as GSAK, OziExplorer etc, as well as all things hardware, GPSrs, laptops, PDAs, paperless caching, cables etc
-
Big Matt and Shell
- 6500 or more caches found
- Posts: 1905
- Joined: 11 February 07 9:53 pm
-
Contact:
Post
by Big Matt and Shell » 01 November 11 2:45 pm
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: Select all
#*******************************************
# 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: Select all
#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
-
ian-and-penny
- 10000 or more caches found
- Posts: 1067
- Joined: 13 October 03 11:45 am
- Location: Travelling Australia using a Garmin Montana 650T
Post
by ian-and-penny » 01 November 11 3:23 pm
Pointless Text Removed
Last edited by
ian-and-penny on 03 November 11 2:22 pm, edited 1 time in total.
-
ian-and-penny
- 10000 or more caches found
- Posts: 1067
- Joined: 13 October 03 11:45 am
- Location: Travelling Australia using a Garmin Montana 650T
Post
by ian-and-penny » 01 November 11 8:55 pm
Here's your starter: (download it from here
PolygonFilter.gsk)
Code: Select all
#*******************************************
# 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>