home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
coders
/
arexx
/
misc_arexx
/
oil.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-03-30
|
3KB
|
198 lines
/*
This program does some nice things to your shell:
It incorporates Arexx 100% thus:
Calulate with floats... I use it instead of c:Eval (no floats!)
Use Variables and arrays.
Do....End loops.
Talk with programs through Shell (via Arexx port)
etc...
Can be started by itself!!
The program is not documented so much... Sorry... But I thought it might
give inspiration to you... or YOU! ;-D
TUSE - The Ultimate Shell Enhancer v0.3ß
Created by:
Warp oh' GiGA Productions...©1995/97
Alias
Fini A. Alring
Højsgårds Allé 55
2900 Hellerup
Denmark
fini.alring@netmedia.dk
Please send your response, on this program...
Please don't tell it doesn't support shell 100% I know! Look at Version number
Lastup=Sun Mar 30 16:12:18 1997
Help:
TUSE uses some of the ASCII characters, for different tasks:
! - Calculus mode. Ex. !2+2, !2*X, !363.33-21+(X/Y) etc...
. - (CD) Needed to jump through Directories, and Drives...
Use instead of CD. - Ex. .Dh2:, .Devs/, ./, . Dh2:Games/ etc...
/ - (Parent dir) Same as 'Cd /' or './'
Q or Quit = Quit TUSE.
examples:
address 'DOPUS.1' quit
do i=1 to 10; say 'hello';end
---
a=54.55
!a*2
---
Future improvements:
Face prompt! - :·) , :·( , :·| , :·C , ;·D , 8·Q , #8^°=
?Library access...
?fixed cd function... enables: dh0: {enter} and devs {enter}.
*/
say center("TUSE - The Ultimate Shell Enhancer V0.3ß By Fini 'Warp' Alring / GiGA Prod'©95/97",81)
signal on ERROR
signal on SYNTAX
Address command
options failat 21
RC=0
Star:
defPATH=pragma('D')
if RC = 0 then do
FACE=';·)'
end
else do
FACE=':-('
end
options prompt face || "·" || defPATH || "» "
parse pull WARG
WARGCOUNT=WORDS(WARG)
do i=0 to WARGCOUNT-1
XARG.i=WORD(WARG,i+1)
end
/* ^- Argument handler. */
if upper(XARG.0)='Q' | upper(XARG.0)='QUIT' then do
EXIT
end
/* ^- Quit. */
if left(WARG,1)="/" then do
WARG = Right(WARG,Length(WARG)-1)
defPATH=pragma('D','/')
Call Xend
end
/* ^- CD Parent. */
if left(WARG,1)="." then do
WARG = Right(WARG,Length(WARG)-1)
defPATH=pragma('D',Strip(WARG))
Call Xend
end
/* ^- CD emul. */
if upper(Xarg.0)="CD" then do
defPATH=pragma('D',Xarg.1)
Call Xend
end
/* ^- CD emul. */
if left(WARG,1)="!" then do
WARG = Right(WARG,Length(WARG)-1)
Interpret Say WARG
call Xend
end
/* ^- Calc-mode. */
if left(warg,1)="," then do
/* interpret Address CADDY */
WARG = Right(WARG,Length(WARG)-1)
interpret WARG
Call Xend
end
/* ^- Arexx-mode. */
if left(warg,1)="*" then do
CADDY = Right(WARG,Length(WARG)-1)
interpret Address CADDY
call xend
end
/* ^- Address fixer/memorizer. */
/*
address command WARG
*/
interpret WARG
/* ^- AmigaDOS-mode. */
Xend:
Call STAR
SYNTAX:
Say 'SYNTAX!'
ERROR:
Say Centre('···TUSE Error!!!···',80)
Call STAR
return 666