home *** CD-ROM | disk | FTP | other *** search
- ; PCBLOG.WAS v.5.1a - 9/20/92 06:39 AM
- ; Copyright (c) 1992, Gregg Hommel, All Rights Reserved
-
- ; PCBLOG.WAS is a small Windows Aspect file for ProComm for Windows 1.0 or
- ; 1.01. It does little else than log on to a PCBoard system, taking you as
- ; far as the Main Board "Command?" prompt.
-
- integer watchfor, lang = 0, graph = 0
- string prompt_str
-
- proc main
- set connection statmsg on
- when target 0 "?" call get_prompt
- watchfor = 1
- while watchfor
- endwhile
- statmsg "Log in completed."
- set connection statmsg off
- exit
- endproc
-
- ; The following procedure, get_prompt, handles the multitude of possible
- ; prompts which PCBoard systems use during log ins, by getting the promnpt
- ; line from the terminal, and then examining it for various keywords and
- ; phrases.
-
- proc get_prompt
- termgets $ROW 0 prompt_str $COL
- if chk_prompt("Command")
- watchfor = 0
- elseif chk_prompt("Enter)=yes?") || chk_prompt("More?") || chk_prompt ("Enter = Yes?")
- transmit "N^M"
- elseif chk_prompt("=no change?") && lang == 0
- transmit "^M"
- lang++
- elseif chk_prompt("Enter)=no?") || chk_prompt("continue?") || chk_prompt("=none?") || chk_prompt("Enter = No?")
- if chk_prompt("graphics") || chk_prompt("Color?") && graph == 0
- transmit "N Q NS^M"
- graph++
- else
- transmit "^M"
- endif
- elseif chk_prompt("Password (Dots")
- transmit $PASSWORD
- transmit "^M"
- elseif chk_prompt("name?")
- transmit $USERID
- transmit " "
- transmit $PASSWORD
- transmit "^M"
- elseif chk_prompt("new user?") || chk_prompt("new caller?")
- transmit "r^M"
- endif
- endproc
-
- ; This function, chk_prompt, is not normally necessary, since all it does
- ; is use the strfind command to locate a keyword or phrase in the prompt
- ; string. However, Windows Aspect does not allow multiple strfind commands
- ; in a single "if" statment, but it will allow multiple function calls, so
- ; this function makes the script more compact.
-
- func chk_prompt:integer
- strparm chk_out
- strfind prompt_str chk_out
- return FOUND
- endfunc
-
-