/*
    $VER: KillVeryAllDupes.zprx 0.9ß (25.7.94) Copyright (c) Jan Ritzerfeld

    Dies ist ein ARexx-Skript für Zodiac's  Point,  mit  dem  man  auf
    bequeme Weise Dupes in allen Brettern löschen kann.

    Sie erreichen den Autor wie folgt:

       Jan Ritzerfeld         Tel. : +49 2421 65177
       Dornheckweg 9          EMail: j.ritzerfeld@darkness.gun.de
       52355 Düren-Birgel

    Sie dürfen dieses Skript beliebig kopieren,  solange  es  zusammen
    mit  Zodiac's  Point  eingesetzt wird, aber verändern Sie es bitte
    nicht ohne Erlaubnis des Autors.

    Hinweise zur Installation:

    Kopieren sie dieses Skript in  das  Rexx-Verzeichnis  von  ZP  und
    fügen  sie  danach  der  Datei  'fkeys.zp'  auf Wunsch den Eintrag
    "F1:SYS:Rexxc/RX ZPOINT:Rexx/KillVeryAllDupes.zprx %s" hinzu.
*/

parse arg zpPort
address value zpPort
options results

GUILOCK ON
options failat 10
signal on syntax

WHICHLEVEL
level = result
if (level ~= 'BOARDMENU') then
  BOARDMENU
GUILOCK ON

dupboards = 0

JUMPTOBOARD 1
rc = 1
  do while rc
  BOARDINFO PATH
  if exists(result'/messages.zp') then
  do
    ENTERBOARD
    GUILOCK ON
    DELETEDUPES
    if rc then
      dupboards = dupboards+1
    GUILOCK ON
    BOARDMENU
    GUILOCK ON
  end
  DOWN 1
  end

if (dupboards = 0) then
  REQUESTNOTIFY 'Keine Dupes gefunden'
else
  do
  if (dupboards = 1) then
    REQUESTNOTIFY 'Dupes in 1 Brett gefunden'
  else
    REQUESTNOTIFY 'Dupes in 'dupboards' Brettern gefunden'
  end

GUILOCK OFF

exit


syntax: /* Ein Fehler ist aufgetreten ! */

REQUESTNOTIFY 'Schade auch, Fehler in Zeile' SIGL ':' ERRORTEXT(rc) ':-('
GUILOCK OFF

exit
