File Archive

 
Output of file : HIDEXFER.WAS contained in archive : HIDEXFER.ZIP

; script to hide file transfer window
; rev 1.0 7/13/92 Allen Kluender
;
; Run this script to hide the file transfer window during a file xfer.
; After the window is hidden, the script adds a "show xfer"
; command to the "Window" menu to allow the window to be unhidden.
; The file transfer is unaffected by the window status.


proc main
string prtcl_name
integer window_id, check
getitem protocol $PROTOCOL prtcl_name ; get the current protocol
if $FILEXFER == 1
activatewin prtcl_name ; activate the transfer window
window_id = $ACTIVEWIN
hidewin window_id ; hide the window
call new_menu ; call procedure to add "show xfer" to the Window menu
else
usermsg "No file is being transfered right now."
endif
while $FILEXFER
check = $MENU ; check to see if "show xfer" has been selected
if check == 1
showwin window_id ; if so unhide transfer window
exit
endif
endwhile
endproc

proc new_menu ; change Window menu to add "show xfer" command
integer menu1 = $PWMENUBAR
menubar menu1
menupopup menu1 " " menu1
menuitem 4 separator
menuitem 4 1 "Show File &Xfer"
showmenu menu1
endproc