home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #3
/
amigamamagazinepolishissue1998.iso
/
bazy
/
fiasco_2.1
/
arexx
/
dummy.frx
< prev
next >
Wrap
Text File
|
1997-10-06
|
2KB
|
109 lines
/* dummy.frx
* Skeleton script that can be used as base for ARexx scripts
* Copyright © 1997 Nils Bandener
* $VER: dummy_frx 6.7 (6.10.97)
*/
/* Please specify here a name for the ARexx script:
*/
scriptname = "Dummy Script"
Options Results
/*
* If not called from Fiasco, try to address the active
* Fiasco project
*/
if ~abbrev(address(), "FIASCO.") then
do
/* Get list of all available ports */
ports = show("Ports")
/* Search for a port of Fiasco */
do i = 1 to words(ports)
if abbrev(word(ports, i), "FIASCO.") then
do
/* A port of Fiasco has been found.
* Now query Fiasco to return the port
* name of the active database.
*/
Address Value word(ports, i)
GetAttr Project Name Active ARexx
Address Value Result
break
end
end
end
fiasco_port = address()
Signal on Syntax
Signal on Halt
Signal on Break_C
Signal on Failure
LockGUI
/* Code of own scripts must be inserted here.
* To exit the script, you may directly fall through to bail_out
* or call it directly.
*/
bail_out:
Address Value fiasco_port
UnlockGUI
ResetStatus
exit
syntax:
failure:
if show("Ports", fiasco_port) then
do
Address Value fiasco_port
RequestChoice '"Error ' || rc || ' in line ' || sigl || ':*n' || errortext(rc) || '" "Cancel" Title "' || scriptname || '"'
end
else
do
say "Error" rc "in line" sigl ":" errortext(rc)
say "Enter to continue"
pull dummy
end
call bail_out
halt:
break_c:
if show("Ports", fiasco_port) then
do
Address Value fiasco_port
RequestChoice '"Script Abort Requested" "Abort Script" Title "' || scriptname || '"'
end
else
do
say "*** Break"
say "Enter to continue"
pull dummy
end
call bail_out