home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fonts 1
/
freshfonts1.bin
/
programs
/
amiga
/
tpp
/
rexx
/
showlogfile.tpl
< prev
next >
Wrap
Text File
|
1994-01-06
|
2KB
|
82 lines
/* Show Logfile - Macro */
/* Kick 2.0 only */
options results
binary='C:Type'
/* output='>"CON:0/16/700/440/Show Logfile/AUTO/WAIT/ALT/INACTIVE/SCREENTextPlus"' */
hailstring='Show Logfile'
address 'TextPlus'
/* get name of current file */
'GetName'
filename = result
/* get screen name */
'GetScreenName'
pub_name = result
/* left edge */
'GetWindowLeftEdge'
le = result
/* top edge */
'GetWindowTopEdge'
te = result
/* width */
'GetWindowWidth'
wi = result
/* height */
'GetWindowHeight'
he = result
output = '>"CON:'||le||'/'||te||'/'||wi||'/'||he||'/'||hailstring||'/AUTO/WAIT/ALT/INACTIVE/SCREEN'||pub_name||'"'
/* strip off extension */
if RIGHT(filename, 4) == '.tex' | RIGHT(filename, 4) == '.tpp' then do
len = LENGTH(filename) - 4
filename = LEFT(filename, len)
end
'RequestString' hailstring'\\'filename
showopts = result
n = WORDS(showopts)
fullname = WORD(showopts, n)
n = LENGTH(showopts) - LENGTH(fullname)
printopts = LEFT(showopts, n)
PARSE VALUE namestruc(fullname) WITH ivol idirs ibase .
IF fullname == "" then empty = 'true'
else empty = 'false'
IF "" == SUBSTR(fullname, 1+ivol+idirs+ibase) THEN DO
fullname = fullname||".log" /* supply a default extension */
ibase = ibase + 4
END
IF 0 = ivol THEN DO
direc = PRAGMA('d')
IF RIGHT(direc,1)~='/' & RIGHT(direc,1)~=':' THEN direc=direc||'/'
fullname = direc||fullname
DROP direc
END
ELSE DO
direc = SUBSTR(fullname, 1, ivol+idirs)
IF RIGHT(direc,1) = '/' THEN DO
n = LENGTH(direc)
direc = LEFT(direc, n-1)
END
call pragma 'Directory', direc
END
DROP ivol idirs ibase
/* valid filename ? */
if empty = 'false' then do
address command binary output fullname
end
else
'Display' 'Show Logfile --- Aborted'