| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Door usage util |
On Sat, 15 Nov 2014, Todd Yatzook wrote to Mark Lewis:
TY> H'okay, taking it here. Actually, an MPL script would be awesome,
TY> but then I'd have to actually learn that. Is there a manual I can
TY> read on it?
not really... i think there's some stuff in the older mystic docs but
everything else, changes and additions, is in the whatsnew...
TY> I figure I'd just need to keep a log like so:
TY> DOOR_NAME
TY> and have the script just count the number of unique entries towards
TY> the total.
since you are in winwhatever, you can add this to each of your doors' bat
files that mystic executes... for example, you might have a simple bat file
like this...
{at}echo off
cd \mystic\doors\somedoor
somedoor /n%1
where the %1 is passed from inside mystic for the node number... you could
fix it like this...
{at}echo off
cd \mystic\doors\somedoor
echo somedoor node%1 start %date %time >> \mystic\logs\doorruns.log
somedoor /n%1
echo somedoor node%1 stop %date %time >> \mystic\logs\doorruns.log
that would give you whatever you placed as "somedoor"
"nodeX" the start and stop date and time in the doorruns.log...
then you could parse that to figure out the time spent in the door... you'd
need to verify that the %date and %time variables are valid for your
winwhatever, though... or figure out how to get to them so you could record
them in the log file...
when i mentioned a mpl, my first thought was two automatically executed
entries, one before and one after the menu command that executes the door
script... they would replace the above two added echo lines and perform the
same functions... they would be easier because they can get the date and
time easier than might be done from the command line in a
""dos"" window...
then my second thought was to maybe have a mpl used to launch the doors...
all your doors would use this mpl and pass the name of the door... the mpl
would the execute the same menu command used from in the menu system to
launch the door... the mpl would note the current time and date, execute
the door and then note the time and date on return... it could then easily
figure out the time spent and log it all for later... either in a binary
file or a plain text file... possibly something like
somedoor node# startdate starttime enddate endtime elapsedtime
then your parser would look at and add up the elapsedtime entries for a
general accounting or break it down and process the startdates in the range
you want... counting the entries would give you the number of uses... the
mpl could also easily add the user's name or number to the data in the log
so you could count unique users or even topX users overall and/or for each
door...
TY> Then be able to parse it as daily/weekly/monthly/all
TY> time usage on the fly. I guess it shouldn't be TOO hard, but again,
TY> I'd need to read up on it.
i've done a little mpl stuff because it is like pascal which i still write
code in... some things are slightly different but for the most part it is
easy enough to figure out... i've always got other scripts that i'm looking
at for hints and understanding anyway ;)
i've got an idea or two... let me see if i can throw something simple
together and you can expand on it if you like...
also, gryphon (darryl perry) of Cyberia BBS might have something already or
he may have additional ideas and thoughts about this... he's one of the
leading mpl guys in the mystic world ;)
)\/(ark
* Origin: (1:3634/12)SEEN-BY: 3/0 633/267 280 640/384 712/0 620 848 770/1 @PATH: 3634/12 123/500 261/38 712/848 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.