Category : Communication (modem) tools and utilities
Archive   : PRCMSCRP.ZIP
Filename : NEWSBYTE.ASP

 
Output of file : NEWSBYTE.ASP contained in archive : PRCMSCRP.ZIP
; script to fetch newsbytes most recent file
; aspect script to fetch genie newsbytes most recent file if not logged on
; do so then log off.
;
; You must store your user id, password in metakey 9 to use these scripts
; this means there is only one place to change your password
;
; If your hourly RATE is not $6.00 per hour change this variable (line 29)
;
;
; this is shareware if you use it please submit a $5.00 regristration fee
; to the author $15.00 for the entire sequence in this package
; Stephen Decarie
; 62 Beacham Way NW
; Calgary
; Alberta T3K 1R8
; Canada
;
;
define entry "7" ; dialing directory entry for Genie change to your number
string stime;
string etime ; start & end times

proc main

string chrs,cmins,csecs ;
string chre,cmine,csece ; character version of of hours & minutes

float RATE = 8.56 ; Genie charge rate per hour

float COST , elapsed
float hrs,mins,secs;
float hre,mine,sece ;
float hr,min,sec ;
;when 0 "leaving " call times ; start clock
;when 1 "entering" call timend ; end clock
when 0 "aborted" call badtrn ; quit

integer logstat =0 ; 0 means not currently on;
string theday

clear ; clear screen
atsay 1 25 46 "GEnie NewsBytes Retrieval"
date theday
fatsay 1 55 46 "Date %s" theday

if CONNECTED
logstat = 1 ; currently logged on
goto GNEWS
endif
; not logged on so do so now
locate 0 0 ; locate cursor at 0,0
box 0 0 4 22 14 ; draw box
atsay 2 2 14 "Logging onto GENIE." ; put message in box
locate 6 0 ; cursor to row 6
pause 1 ;
dial entry
transmit "HHH" ;
waitfor "#=" 30 ;
set duplex full ; ensure password & userid not visible

metakey 9; transmit user id/password stored in metakey 9
transmit "^M" ; followed by a carriage return
set duplex half ; restore screen display
waitfor "continue?" 30 ;
pause 1;
transmit " ^M" ; a carriage return
waitfor "?" ;

GNEWS:
call times ; start clock
transmit "M316" ; moves to page 316
transmit "^M" ; carriage return
waitfor "P 316?" forever
transmit "7"
transmit "^M"
waitfor "

revious" forever
transmit "1" ; item
transmit "^M" ; carriage return
waitfor "to skip" forever
transmit "4"
transmit "^M"
waitfor "

revious" forever
transmit "P" ; previous page
transmit "^M"
waitfor "P 316?" forever
transmit "top"
transmit "^M"
call timend ; stop charge clock

substr csecs stime 6 2 ; extract seconds, minutes & hours
substr cmins stime 3 2 ; of both start and end time
substr chrs stime 0 2

substr csece etime 6 2 ; end time
substr cmine etime 3 2
substr chre etime 0 2

atof csecs secs ; convert character data to float
atof chrs hrs
atof cmins mins

atof chre hre ; end times to float
atof cmine mine
atof csece sece

hr = hre - hrs; # hours
min = mine - mins; # minutes
sec = sece - secs ; # seconds

if( sec < 0 ) ; more than 1 minute
sec = sec + 60
min = min - 1
endif

if ( min < 0 ) ; hourly boundary
min = min + 60
if hr > 0
hr = hr - 1
endif
endif

if (hr < 0) ; note we are using Military time
hr = hr + 24 ; this should only happen at midnight (untested)
endif


elapsed = hr + min/60 + sec / 3600; elapsed time in hours
cost = RATE * elapsed;
box 11 30 13 50 76 ; display cost
fatsay 12 33 41 " cost %f " cost ; cost of retrieval
pause 10 ;

if logstat = 0
transmit "BYE" ; go back to off
transmit "^M" ; carriage return
else
execute "GENSTART.ASX" ; return to main menu
endif

endproc

proc times ; start time for chargeable event
box 1 32 3 50 79 ; display leaving time
time stime 1
fatsay 2 34 41 " time %s " stime
pause 10 ;
endproc
proc timend ; end time for chargeable event
box 7 30 9 50 78 ; display leaving time
time etime 1
fatsay 8 32 41 " time %s " etime
pause 10 ;
return
endproc
proc badtrn ; this is what is supposed to happen
transmit "bye" ; if transmission aborts (untested)
transmit "^M"
call timend;
exit ;
endproc


  3 Responses to “Category : Communication (modem) tools and utilities
Archive   : PRCMSCRP.ZIP
Filename : NEWSBYTE.ASP

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/