Advanced

Change History

Discuss your script development with others (bugs, optimizations, methods ...)

Message: Stopping Checkers on found date

Changed By: sloth96
Change Date: August 16, 2021 01:59PM

Stopping Checkers on found date
Howdy,

I maintain a couple of variation on Jasmer checkers and am thinking of adding a check to see if they are found already. With this information the checker could override the end date and get rid of the long list of people who "do not meet the requirements" because they found it ages ago.

The snippet I am thinking of adding to mine looks like:

[code]
--deal with already found so status does not thrash or show long list of unqualified folks

local alreadyfound = PGC.GetFinds(profileId, { fields = {'gccode', 'visitdate'}, order = 'OLDESTFIRST', filter = {gccodes = {args[1].gccode} }})


if #alreadyfound >0 then
if conf.end_date=="today" or conf.end_date>alreadyfound[01].visitdate then
conf.end_date=alreadyfound[1].visitdate
end
end
[/code]

This should help tidy up some pages for cache owners and users with the Tampermonkey scripts.

Any thoughts?

Thanks

Original Message

Author: sloth96
Date: August 16, 2021 01:23PM

Stopping Checkers on found date
Howdy,

I maintain a couple of variation on Jasmer checkers and am thinking of adding a check to see if they are found already. With this information the checker could override the end date and get rid of the long list of people who "do not meet the requirements" because they found it ages ago.

The snippet I am thinking of adding to mine looks like:

[code]
--deal with already found so status does not thrash or show long list of unqualified folks
local alreadyfound = PGC.GetFinds(profileId, { fields = {'gccode', 'visitdate'}, order = 'OLDESTFIRST', filter = {gccodes = {args[1].gccode} }})

if alreadyfound then
if conf.end_date=="today" or conf.end_date>alreadyfound[0].visitdate then
conf.end_date=alreadyfound[1].visitdate
end
end
[/code]

This should help tidy up some pages for cache owners and users with the Tampermonkey scripts.

Any thoughts?

Thanks