home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
22
/
TIFPRO2.ZIP
/
THEINVE.WAS
< prev
next >
Wrap
Text File
|
1996-04-19
|
3KB
|
123 lines
#define _SEARCHSTR "Your_Ipaddress:"
integer iOriginalMode = 0
proc main
when USEREXIT call ManualLogon
when $RMOUSESTATE call CheckLeftMouseState
iOriginalMode = $PWMODE
statmsg "Click right and left mouse buttons simultaneously for manual logon..."
transmit "^M"
ISPLogon()
pause 5
endproc
proc CheckLeftMouseState
when $RMOUSESTATE SUSPEND
if $LMOUSESTATE
ManualLogon()
else
when $RMOUSESTATE RESUME
endif
endproc
proc ManualLogon
when USEREXIT SUSPEND
when $RMOUSESTATE SUSPEND
if $PWMODE != 0 ;if in a mode other than TERMINAL mode
usermsg "In order to logon manually PROCOMM PLUS must switch to terminal mode for logon. PROCOMM PLUS will switch back to this mode after logon."
pwmode TERMINAL
endif
statclear
when ISKEY 1 0x1B call ExitSuccess ;if user presses <Esc>
for i3 = 45 DOWNTO 0
statmsg "Press <Esc> after logging on. Time remaining: %d seconds" i3
pause 1
endfor
ExitSuccess()
endproc
proc ExitSuccess
statclear
if iOriginalMode != $PWMODE
pwmode iOriginalMode
mspause 500
sendkey ALT 'N' ;press NO button on "disconnect" dialog
endif
pause 2
exit 0 ;exit with SUCCESS code (0)
endproc
; ISPLogon
; Internet Service Provider logon procedure for The Invention Factor.
proc ISPLogon
string szLogonName = $NULLSTR
string szPassword = $NULLSTR
string szLine, szIPAddress, szIPGateway
string szINIFile = $WINPATH
integer Position, StrLength
fetch internet logonname szLogonName
fetch internet password szPassword
fetch internet gatewayaddress szIPGateway
transmit "^M"
waitfor "Enter Language # to use (Enter)=no chan" 30
pause 1
transmit "3^M"
waitfor "Do you want graphics" 30
pause 1
transmit "n^M"
waitfor "What is your first na" 30
pause 1
transmit szLogonName
transmit "^M"
pause 1
transmit "Y"
waitfor "Is this correc" 30
pause 1
transmit "^M"
waitfor "Password (Dots will echo)? " 30
pause 1
transmit szPassword
transmit "^M"
waitfor "Now"
snapshot FILE "C:\PWTEMP.TXT"
fopen 0 "C:\PWTEMP.TXT" READ TEXT
while not feof 0
fgets 0 szLine
if strfind szLine _SEARCHSTR Position
strlen _SEARCHSTR StrLength
Position = Position + StrLength
szIPAddress = szLine
strdelete szIPAddress 0 Position
strextract szIPAddress szIPAddress " " 0
addfilename szINIFile "SUPERTCP.INI"
profilewr szINIFile "kernel" "IPAddress" szIPAddress
profilewr szINIFile "kernel" "IPGateway" szIPGateway
profilewr szINIFile "interfaces" "IPAddress1" szIPAddress
exitwhile
endif
endwhile
fclose 0
delfile "C:\PWTEMP.TXT"
endproc