home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power CD-ROM!! 7
/
POWERCD7.ISO
/
dos
/
commo641
/
commo.mac
< prev
next >
Wrap
Text File
|
1994-11-20
|
20KB
|
452 lines
┌────────────┐
PgDn for more macros │ Macro File │ PgDn for more macros
└────────────┘
Most of the macros in this file support {COMMO} features, such as file
transfers and VT102 emulation. Others are provided as examples and may need
to be modified to work for you. More examples are shown in SAMPLES.MAC.
See MACRO.DOC for a complete guide to programming {COMMO} macros.
ASCII Upload macro, press Alt-A
────────────────────────────────────────────────────────────────────────────
{:ala} {ascii %uldir\} {} ASCII Upload with upload path
Macro to review capture file, press Shift-F8 Program required
────────────────────────────────────────────────────────────────────────────
{:sf8} {exec LIST %_cap /e} {} (aka Scrollback using no RAM) LIST.COM
Simple login macro, press F2
────────────────────────────────────────────────────────────────────────────
{:nf2} {send First|~~Last|~~~~%_pas|} {} RBBS, PCBoard, Auntie, etc.
Macro to list download directory, press Alt-F10
────────────────────────────────────────────────────────────────────────────
{:af0} {exec-w dir %dldir /w} {} Download directory
Macros to load VT102/VT220/PINE keyboard files
────────────────────────────────────────────────────────────────────────────
{:vt102} {goto ,vt102.mac} Put "vt102" in directory macro field
{:vt220} {goto ,vt220.mac} Put "vt220" in directory macro field
{:pine} {goto ,pine.mac} Put "pine" in directory macro field
Macro to login to a PCBoard (put "pcb" in Dialing Directory macro field)
────────────────────────────────────────────────────────────────────────────
{:pcb} {capture y,c:\commo\pcb.cap} {asci ,}
{setlook 60,hng}
{lookfor graphics} {send y|}
{setlook 60,hng,6,n|}
{lookfor first name?}
{send First Last|~%_pas|} <= your name here
{lookfor Main Board Command?} {}
{:hng} {hangup y} {stop}
CompuServe login macro
────────────────────────────────────────────────────────────────────────────
{:cis} {setlook 45,hng,2,^c} {send ^c}
{capt y,c:\commo\cis.%_day} {asci ,:}
{lookfor User ID:} {send XXXXX,XXX|} <= Change to your user ID
{setl 20,hng} {lookfor Password:} {send %_pas|} {}
GEnie login macro
────────────────────────────────────────────────────────────────────────────
{:genie}
{setlook 90,hng} {capt y,c:\commo\genie.%_day}
{asci ,>} {local y} {send ~H~H~H}
{lookfor u#} {send XXXXXXXX,%_pas|} {} <= Change to your user #
Doorway Mode macro (key must be defined in COMMO.SET)
────────────────────────────────────────────────────────────────────────────
{:al=} {doorway} {} Toggle Doorway Mode
DOWNLOAD (receive) menu macro
────────────────────────────────────────────────────────────────────────────
{:pgd} {:mpd}
{setv _menu1, [F1] for HELP}
{setv _menu3, Z ■ Zmodem batch (mode=%zr_mode) Internal}
{setv _menu4, (Press "M" to change Zmodem receive mode)}
{setv _menu5, Y ■ Ymodem batch Internal}
{setv _menu6, G ■ Ymodem-G batch Internal}
{setv _menu7, X ■ Xmodem-CRC (or old Ymodem) Internal}
{setv _menu8, O ■ Xmodem-G Internal}
{setv _menu9, S ■ Xmodem csum Internal}
{setv _menu11, IMPORTANT: The following external}
{setv _menu12, protocols require that the indicated}
{setv _menu13, program be installed on your system.}
{setv _menu15, H ■ HS/Link using HSLINK.EXE}
{setv _menu16, K ■ Kermit using KERMIT.EXE}
{setv _menu17, B ■ CompuServe B, B+ using OZBEXT.EXE}
{setv _mlabel,phld,pcbr,,,,,pygr,phbr,,,pckr,,pmzm,,pxgr,,,,px2r,,,,,px1r,pybr,pzbr}
{setv _mcolor,%menu_clr}
{menu 21,47,DOWNLOAD Protocol Menu} {return}
Help {:phld} {help z} {goto mpd}
Zmodem {:pzbr} {setv pr_alarm} {setv pr_down,%dldir} {call z_recv} {}
Y batch {:pybr} {setv pr_alarm} {setv pr_down,%dldir} {call yb_recv} {}
Y-G batch {:pygr} {setv pr_alarm} {setv pr_down,%dldir} {call yg_recv} {}
X CRC {:px1r} {setv pr_alarm} {call gfnd} {call xc_recv} {}
X-G {:pxgr} {setv pr_alarm} {call gfnd} {call xg_recv} {}
X csum {:px2r} {setv pr_alarm} {call gfnd} {call xs_recv} {}
HSLink {:phbr} {setv pr_alarm} {setv pr_down,%dldir} {setv pr_file}
{info-q0s0 Any files to upload?}
{ifco ,phbr_1} {call gfnu}
{:phbr_1} {call h_recv} {}
Kermit {:pckr} {setv pr_alarm} {setv pr_down,%dldir} {call k_recv} {}
CIS BPlus {:pcbr} {setv pr_alarm} {setv pr_down,%dldir} {call b_recv} {}
{:gfnd} {setv pr_file,%dldir\} {input pr_file,Enter a filename to DOWNLOAD}
{ifex %pr_file,,gf_y} {info-q0 File exists, overwrite?}
{ifco gf_y} {send ^x^x^x^x^x^x^x^x^h^h^h^h^h^h^h^h^h^h} {}
{:gf_y} {return}
UPLOAD (send) menu macro
────────────────────────────────────────────────────────────────────────────
{:pgu} {:mpu}
{setv _menu1, [F1] for HELP}
{setv _menu3, Z ■ Zmodem batch Internal}
{setv _menu4, Y ■ Ymodem batch Internal}
{setv _menu5, G ■ Ymodem-G batch Internal}
{setv _menu6, X ■ Xmodem-1K (old Ymodem) Internal}
{setv _menu7, O ■ Xmodem-G Internal}
{setv _menu8, S ■ Xmodem Internal}
{setv _menu10, IMPORTANT: The following external}
{setv _menu11, protocols require that the indicated}
{setv _menu12, program be installed on your system.}
{setv _menu14, H ■ HS/Link using HSLINK.EXE}
{setv _menu15, K ■ Kermit using KERMIT.EXE}
{setv _menu16, B ■ CompuServe B, B+ using OZBEXT.EXE}
{setv _mlabel,phlu,pcbs,,,,,pybs,phbs,,,pcks,,,,px1s,,,,px2s,,,,,px1s,pybs,pzbs}
{setv _mcolor,%menu_clr}
{menu 20,47,UPLOAD Protocol Menu} {return}
Help {:phlu} {help z} {goto mpu}
Y batch {:pybs} {setv pr_alarm} {call gfnu} {call yb_send} {}
X-1K {:px1s} {setv pr_alarm} {call gfnu_x} {call xk_send} {}
X {:px2s} {setv pr_alarm} {call gfnu_x} {call x_send} {retu}
Zmodem {:pzbs} {setv pr_alarm} {call gfnu} {call z_send} {}
HS/Link {:phbs} {setv pr_alarm} {setv pr_down,%dldir} {call gfnu}
{call h_send} {}
Kermit {:pcks} {setv pr_alarm} {call gfnu_x} {call k_send} {}
CIS BPlus {:pcbs} {setv pr_alarm} {setv pr_up,%uldir} {call b_send} {}
{:gfnu} {call sel_delsend}
{inst sel_up,y} {comp _pos,1} {ifco gfnu_s}
{setv pr_file,%uldir\}
{input pr_file,Filename to UPLOAD (Press Enter for picklist)}
{comp pr_file} {ifco gfnu_s}
{comp pr_file,%uldir\} {ifco gfnu_s}
{ifex %pr_file,,gfnu_n} {return}
{:gfnu_n} {info-d2 File not found}
{:gfnu_s} {inst sel_pns,y} {comp _pos,1} {ifco gfnu_p}
{call select} {goto gfnu_t}
{:gfnu_p} {setv pr_file,@%_hom%^(send^).lst}
{exec-d %protodir\COMMOPNS.EXE %_hom%^(send^).lst -D%uldir -S%_mod}
{:gfnu_t} {comp pr_file} {ifco gfnu_c}
{ifexist %_hom^(send^).lst,,gfnu_c} {return}
{:gfnu_c} {send ^x^x^x^x^x^x^x^x^h^h^h^h^h^h^h^h^h^h}
{inform-s0d1 No files to send} {}
{:gfnu_x} {call gfnu} {ifex %_hom^(send^).lst,,gfnu_r}
{ropen %_hom^(send^).lst,gfnu_c}
{:gfnu_a} {read pr_file} {comp pr_file} {ifco gfnu_a} {rclose}
{:gfnu_r} {return}
Protocol macros used for DOWNLOADING (receiving)
────────────────────────────────────────────────────────────────────────────
These are the basic download protocol macros and may be CALLed
from anywhere. The following variables must be set (if applicable):
pr_down download directory
pr_file filespec (files to download)
pr_alarm set to: 0 - alarm off
1+ - number of rings
null - default rings (from setup)
Internals
{:z_recv} {goto zmr_%zr_mode} Zmodem batch
{:zmr_s} {:zmr_} {rzmo %pr_down} {goto zmr_end} Skip (default)
{:zmr_r} {rzmo-r %pr_down} {goto zmr_end} Resume
{:zmr_n} {rzmo-n %pr_down} {goto zmr_end} Rename
{:zmr_o} {rzmo-y %pr_down} {goto zmr_end} Overwrite
{:zmr_end} {alarm %pr_alarm} {retu}
{:yb_recv} {rymo %pr_down} {alarm %pr_alarm} {retu} Ymodem batch
{:yg_recv} {rymo-g %pr_down} {alarm %pr_alarm} {retu} Ymodem-G batch
{:xc_recv} {rxmo-y %pr_file} {alarm %pr_alarm} {retu} Xmodem-CRC
{:xg_recv} {rxmo-gy %pr_file} {alarm %pr_alarm} {retu} Xmodem-G
{:xs_recv} {rxmo-c0y %pr_file} {alarm %pr_alarm} {retu} Xmodem-Csum
HS/Link
{:h_recv} {exec-d %protodir\HSLINK.EXE -pb0x%_pad -pi%_irq -nv %pr_file -u%pr_down}
{alarm %pr_alarm} {retu}
Kermit
{:k_recv} {exec-d %protodir\KERMIT.EXE set file type binary, log transaction %_uselog, set port %_por, cd %pr_down, receive}
{alarm %pr_alarm} {retu}
CIS BPlus
{:b_recv} {exec-d %protodir\OZBEXT.EXE /c%_por /f%pr_down /n /x}
{alarm %pr_alarm} {retu}
Protocol macros used for UPLOADING (sending)
────────────────────────────────────────────────────────────────────────────
These are the basic upload protocol macros and may be CALLed
from anywhere. The following variables must be set (if applicable):
pr_up upload directory (B+ only)
pr_down download directory (HS/Link only)
pr_file filespec (files to upload)
pr_alarm set to: 0 - alarm off
1+ - number of rings
null - default rings (from setup)
Internals
{:z_send} {szmo %pr_file} {alarm %pr_alarm} {retu} Zmodem batch
{:yb_send} {symo-k %pr_file} {alarm %pr_alarm} {retu} Ymodem batch
{:xk_send} {sxmo-k %pr_file} {alarm %pr_alarm} {retu} Xmodem 1k
{:x_send} {sxmo %pr_file} {alarm %pr_alarm} {retu} Xmodem
HS/Link
{:h_send} {exec-d %protodir\HSLINK.EXE -pb0x%_pad -pi%_irq -nv %pr_file -u%pr_down}
{alarm %pr_alarm} {retu}
Kermit
{:k_send} {exec-d %protodir\KERMIT.EXE set file type binary, log transaction %_uselog, set port %_por, send %pr_file}
{alarm %pr_alarm} {retu}
CIS BPlus
{:b_send} {exec-d %protodir\OZBEXT.EXE /c%_por /f%pr_up /n /x}
{alarm %pr_alarm} {retu}
Zmodem like-named file menu macro
────────────────────────────────────────────────────────────────────────────
{:pmzm}
{goto zmm_%zr_mode}
{:zmm_s} {:zmm_} {setv zmr_disp,Skip} {setv zmr_temp,s} {goto zmr_menu}
{:zmm_r} {setv zmr_disp,Resume} {setv zmr_temp,r} {goto zmr_menu}
{:zmm_n} {setv zmr_disp,Rename} {setv zmr_temp,n} {goto zmr_menu}
{:zmm_o} {setv zmr_disp,Overwrite} {setv zmr_temp,o}
{:zmr_menu}
{setv _menu1, This parameter tells ^(COMMO^) what to}
{setv _menu2, do when a file received with Zmodem}
{setv _menu3, has the same name as a file that is}
{setv _menu4, already in the download directory.}
{setv _menu6, S ■ Skip (do not receive the file)}
{setv _menu7, R ■ Resume (receive remainder of file)}
{setv _menu8, N ■ Rename (change last letter of name)}
{setv _menu9, O ■ Overwrite (replace the existing file)}
{setv _menu11, Current setting is "%zmr_disp"}
{setv _menu13, Press Enter to save setting}
{setv _mlabel,,,,,,,,,,,,,,zmm_n,zmm_o,,,zmm_r,zmm_s}
{setv _menter,zmr_done}
{setv _mcolor,%menu_clr}
{window-k}
{menu 17,47,Set Zmodem File Receive Mode} {goto zmr_esc}
{:zmr_done}
{setv zr_mode,%zmr_temp}
{:zmr_esc}
{setv zmr_disp} {setv zmr_temp} {wind-k0} {goto mpd}
File select macro used for uploading files
────────────────────────────────────────────────────────────────────────────
{:select}
{setv dsksav,%_dsk} {setv dirsav,%_dir}
{:sel_curdir}
{setv drive,%_dsk} {setv path,%_dir}
{comp uldir} {ifco sel_nouldir}
{setv path,%uldir} {inst %uldir,:}
{comp _pos,2} {ifco ,sel_nodrive}
{subs drive,1,2,%uldir} {subs path,3,66,%uldir}
{:sel_nouldir}
{call sel_chkpath}
{:sel_nodrive}
{file %drive%%path\*.*}
{ifco sel_dirok}
{info-q ULDIR is not a valid directory. Change it?}
{ifco ,sel_exit}
{input uldir,Enter new upload directory (no "\" at end)}
{goto sel_curdir}
{:sel_dirok}
{exec-n %drive}
{comp path} {ifco sel_root}
{exec-n cd %path} {goto sel_topm}
{:sel_root}
{exec-n cd \}
{:sel_topm}
{file %drive%%path\*.*} {setv x,1} {setv endflag,0}
{:sel_floop}
{leng %_ffn} {setv padlen,12} {decr padlen,%_len}
{subs pad,1,%padlen, }
{setv temp,%_ffn%%pad} {leng %_ffs}
{setv padlen,9} {decr padlen,%_len}
{subs pad,1,%padlen, }
{setv temp,%temp%%pad%%_ffs}
{setv temp,%temp %_ffd %_fft}
{setv menu%x,%temp} {setv xl,%x} {incr x} {file-x}
{ifco ,sel_nomore}
{comp x,10} {ifco ,sel_floop}
{:sel_msetup}
{setv menu11, [N] Next page [Enter] to start upload}
{:sel_lsetup}
{setv x,1}
{:sel_mloop}
{comp menu%x} {ifco sel_dispm}
{setv-s temp,menu%x}
{setv _menu%x, %x% ■ %temp} {incr x}
{comp x,11} {ifco ,sel_mloop}
{:sel_dispm}
{setv _menu11,%menu11}
{setv _menu12, [T] Top of directory [M] Manual entry}
{setv _menu13, [W] vieW/edit send list [V] change driVe}
{setv _menu15, "\.." = parent directory "\xxxxx" = subdirectory}
{setv _menter,sel_done}
{setv _mlabel,sel_sel,sel_sel,sel_sel,sel_sel,sel_sel,sel_sel,sel_sel,sel_sel,sel_sel,,,,sel_manual,sel_next,,,,,,sel_topm,,sel_drive,sel_view,sel_done}
{setv _mcolor,%menu_clr}
{window-k}
{menu 19,60,Selecting files from: %drive%%path\}
{setv pr_file}
{call sel_delsend} {goto sel_exit}
{:sel_next}
{comp endflag,1} {ifco sel_enddisp}
{setv x,1} {goto sel_floop}
{:sel_nomore}
{call sel_clrmenu}
{setv menu11, ** LAST PAGE ** [Enter] to start upload}
{setv endflag,1} {goto sel_lsetup}
{:sel_enddisp}
{setv endflag,0} {goto sel_topm}
{:sel_sel}
{comp _msn,%xl} {ifco-g sel_lsetup}
{setv-s temp,menu%_msn} {inst temp,\}
{comp _pos,1} {ifco ,sel_isfile}
{subs temp,2,8,%temp} {exec-n cd %temp} {setv path,%_dir}
{call sel_chkpath} {goto sel_topm}
{:sel_isfile}
{comp temp} {ifco sel_msetup}
{inst temp, } {setv x,%_pos} {decr x}
{subs temp,1,%x,%temp}
{wopen-a %_hom%^(send^).lst} {write %drive%%path%\%temp}
{wclose} {goto sel_lsetup}
{:sel_done}
{setv pr_file,@%_hom%^(send^).lst}
{:sel_exit}
{call sel_cleanup} {return}
{:sel_cleanup}
{exec-n %dsksav} {exec-n cd %dirsav}
{setv x,1} {call sel_clrmenu}
{setv endflag} {setv dsksav} {setv dirsav} {setv temp} {setv drive}
{setv path} {setv x} {setv xl} {setv pad} {setv padlen}
{wind-k0} {return}
{:sel_clrmenu}
{setv menu%x,} {incr x}
{comp x,12} {ifco ,sel_clrmenu} {return}
{:sel_chkpath}
{leng %path}
{comp _len,1} {ifco ,sel_notroot} {setv path}
{:sel_notroot}
{return}
{:sel_delsend}
{ifex %_hom%^(send^).lst,,sel_nolst}
{exec-n del %_hom%^(send^).lst}
{:sel_nolst}
{return}
{:sel_view}
{edit %_hom%^(send^).lst} {goto sel_lsetup}
{:sel_drive}
{wind-k0} {setv temp,%drive}
{sete-p0 sel_escoff}
{input temp,Enter new drive letter}
{setesc}
{comp temp} {ifco sel_lsetup}
{subs temp,1,1,%temp} {setv drive,%temp:}
{exec-n %drive} {setv path,%_dir}
{call sel_chkpath} {goto sel_topm}
{:sel_manual}
{wind-k0} {sete-p0 sel_escoff}
{setv temp,%uldir\}
{input temp,Enter a filename to UPLOAD}
{comp temp} {ifco sel_escoff}
{wopen-a %_hom%^(send^).lst}
{write %temp} {wclose}
{:sel_escoff}
{setesc} {goto sel_lsetup}
Macros for Utility Menu
────────────────────────────────────────────────────────────────────────────
{:alu}
{setv _menu1, A ≡ Edit an External File}
{setv _menu3, B ≡ Run a Macro}
{setv _menu5, C ≡ Load a Macro File}
{setv _menu7, D ≡ Run MOSTHOST host mode}
{setv _menu8, (use E to install)}
{setv _menu10, E ≡ View/Edit MOSTHOST}
{setv _mlabel,uext,urun,uload,uhost,vhost}
{setv _mcolor,%menu_clr}
{menu 14,32,Macro Utility Menu} {}
{:urun} {setv temp} {input temp,Macro to run} {goto %temp} {}
{:uload} {setv temp} {input temp,Macro File to load} {goto-f ,%temp}
{:uext} {setv temp} {input temp,Filename to edit}
{:uedit} {edit %temp} {goto alu} {}
{:uhost} {call bbs,mosthost.mac}
{:vhost} {setv temp,%_hom%mosthost.mac} {goto uedit}
──────────────────────────────
Full Screen Editor Key Support
──────────────────────────────
The following keys are used by full screen editors such as Visual Editor in
ProDoor, PCBoard's full screen editor, ANSIED in RBBS and others. They may
be changed to suit your own needs (all keys do not work with all editors --
capture the editor help info on the BBS). See Appendix D in COMMO.DOC for
details on character representation.
Note that the left arrow function (^S) is also the XOFF character. This may
cause a problem on some systems. If pressing the left arrow seems to hang
the remote, press Ctrl-Q and change the "lfa" macro to:
{send ^[[D} {} or {send ^@K} {}
PgUp and PgDn are normally used for uploading and downloading. To use them
for editing, change the key-labels in the menus above.
Macro Key Function
────────────────────────────────────────────────────────────────────────────
{:hom} {send ^W} {} Home Start of line
{:end} {send ^P} {} End End of line
{:pgu} {send ^R} {} PgUp Page up
{:pgd} {send ^C} {} PgDn Page down
{:upa} {send ^E} {} Up Arrow Cursor up
{:dna} {send ^X} {} Down Arrow Cursor down
{:lfa} {send ^S} {} Left Arrow Cursor left
{:rta} {send ^D} {} Right Arrow Cursor right
{:cla} {send ^A} {} ^Left Arrow Word left
{:cra} {send ^F} {} ^Right Arrow Word right
{:ins} {send ^V} {} Insert Toggle insert mode
{:del} {send ^G} {} Delete Delete character
{:cnd} {send ^K} {} ^End Delete to end of line
- end -