home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / FileMover / Dopus5 / PHN-CD42.LZX / ComDizZ / rexx / ComDizZ.dopus
Encoding:
Text File  |  1995-11-23  |  8.2 KB  |  56 lines

  1. /*@BEGIN_FILE_ID.DIZ
  2.          ________  ___  ___  ___  ___  ___
  3.      [/]/  _____ \/ _ \/ _ \/  / / _ \/ _ \
  4.        /\_ \  /  / ___/ ___/  /_/ ___/__/_/
  5.  ____ /  /  \/  / /  / /  /  / / /  / \  \
  6. (    \\_____/\__\___/\___/\___/\___/__/\__\a
  7. |  ·  )__ ___________)  (_____ ________  _ n
  8. | ___/ l \) . ()    (_  _) . ((  __  ) \/( d
  9. |  (     /     \  |  |  /     /\_  \/     \
  10. |   \_l_/   l___)_l__l_/   l_(_____/   \/\_)
  11. l____)-(_____)-bRiNg- (_____)-ppx-(_____)---
  12.  
  13.   $VER: ComDizZ V4.2 - FDIZ->FCOM converter
  14.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. @END_FILE_ID.DIZ*/
  16.  
  17.   /*------------------------------------------------------------------------*/
  18.  /*                    PREFERENCES: PLEASE EDIT THIS ONLY !                */
  19. /*------------------------------------------------------------------------*/
  20.  
  21. cpath="c:"           /* path for system c: files (snatchdiz,date,etc.)     */
  22. dizpath="c:Diz-Ed"   /* path & name where DizEd2.1 should be               */
  23. lhapath="c:lha"      /* path & name where LHA should be                    */
  24. logpath="s:"         /* path where the log-files for DATECHECK should go   */
  25.  
  26.   /*------------------------------------------------------------------------*/
  27.  /*                             END OF PREFERENCES                         */
  28. /*------------------------------------------------------------------------*/
  29.  
  30. parse UPPER ARG INTER NODIZED DATECHECK;options results;if INTER="FILE" then;do;options failat 21;say "ComDizZ V4.2 - fDIZ->fCOM converter";say "--==»»>> (c)1995 sTEELER[/]phanTasm";say;if NODIZED="" then;do;say "No Filename specified!"
  31. exit 0;end;f=0;all="";say 'Working on file: '||nodized;address command 'snatchdiz >T:'||IIl||'.DIZ "'||nodized||'" S';call dofileid;if all="No fileiddiz available" then;do;say all;exit 0
  32. end;if left(all,19)="Cant lockopen file" then;do;say "File not found...";exit 0;end;if substr(all,7,6)="Snatch" then;do;say "This file can not be opened!";say "File probably contains illegal chars...";exit 0
  33. end;address command 'filenote >nil: "'||nodized||'" "'all'"';say "OK.";exit 0;end;busy on;dopustofront;checkabort;if INTER="INTERACTIVE" then INTER=1;if INTER="MAKELIST" then MAKE=1;if INTER="DATECHECK" then DCHECK=1
  34. if NODIZED="NODIZED" then NODIZED=1;if NODIZED="DATECHECK" then DCHECK=1;if DATECHECK = "DATECHECK" then DCHECK=1;remember;firstfilename=' working...';comcount=0;lI='0a'x;str.6='"6 | mArvelOus pIEce of wOrk! |"';l='32'x;IIl='535445454C4552'X;str.4='"4 | CoMe tO tHe phanTasm WWW |"'
  35. lll= '3E3E20436F6D44697A5A2D56342E'X||l||'20A960393520'X||IIl'2F7068616E5461736D203C3C'X;str.3='"3 |   JuSt a qUIck messAge:  |"';str.9='"9 `--------------------------''"';str.5='"5 |pAges! anD sEE who diD diZ|"';str.1='"1 |ComDizZ V4."'||l||'" © "'||IIl||'"-PHN|"';lIl= '436F6D44697A5A2D56342E'X||l||'20A960393520'X||IIl'2F70686E0A7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E0A'X;str.8='"8 | ->    /PHN/phn.html   <- |"';str.2='"2 |~~~~~~~~~~~~~~~~~~~~~~~~~~|"';status 3;window=result;status 13 window
  36. firstfiledir=result;fifidi=compress(firstfiledir,'/: ');comfile=logpath||'!CDlDir-'||fifidi;restore;if MAKE=1 then;do;firstfilename='Making Indexfile...';count='one dir!';call testabbo;address command 'list >"'||firstfiledir||'!index" "'||firstfiledir||'~(#?.info|!index)" files lformat "%s: %c"';address command 'sort "'||firstfiledir||'!index" "'||firstfiledir||'!index"'
  37. address command 'filenote >nil: "'||firstfiledir||'!index" "IndexFile by: '||lll'"';busy off;rescan;exit 0;end;if DCHECK=1 then;do;if open('lasttime',comfile,'read') then;do;ComLast=readln('lasttime');close('lasttime')
  38. end;if length(comlast)<=19 then do;dope= lIl||'Welcome to the first use of CD on this dir!'lI||lI'Please Remember: The localization of Dopus must'lI'be the same then the one on workbench!'lI'Otherwise ComDizZ won`t work 100% in interactive mode!'lI'And PLEASE read the manual !!!'lI;head= '"OKI!"';butt= '"OKI!"';beep;call output;end;busy on;comlast=right(comlast,18)||" >";remember
  39. modify DateFormat 1;'SELECT "'||comlast||'" onlyfiles date';restore;end;status 9 window;COUNT=result;if COUNT = 0 then;do;dope= lIl||'You Dork! - You forgot to'lI'select a file!'lI;head= "'-=> I`m such a horse! <=-'";butt= "'-=> Ohhhh...so sorry! <=-'"
  40. if DCHECK=1 then;do;dope= lIl||'Sorry - No new files found!'lI;head= "'-=> ComDizZ, you made it! <=-'";butt= "'-=> I guessed there were some! <=-'";end;beep;call output;exit 0;end;call outway
  41. address command 'resident >nil: "'||cpath||'bangerversion" pure';address command 'resident >nil: "'||cpath||'snatchdiz" pure';address command 'resident >nil: "'||cpath||'filenote" pure';address command 'resident >nil: "'||cpath||'delete" pure';address command 'resident >nil: "'||cpath||'date" pure';address command 'resident >nil: "'||lhapath||'" pure';do until master=1;getnextselected;firstfilename=result;call testabbo;address command 'snatchdiz >T:'||IIl||'.DIZ "'||firstfiledir||firstfilename||'" S';f=0
  42. bong=0;skipper=0;dope="";head="";butt="";all="";call testabbo;call dofileid;if substr(all,7,6)="Snatch" then;do;dope= lIl||'ERROR on file:'firstfilename||lI'The file cannot be opened !'lI'Filename probably contains illegal chars !'lI
  43. head= '"I`ll rename it!"';butt= '"I`ll rename it!"';beep;call output;call inway;exit 0;end;if left(all,19)="Cant lockopen file" then;do;dope= lIl||'OH NOOOO!'lI'ERROR: Is this a FILE or a DIR?'lI;head= '"Sorry - this is my first try!"'
  44. butt= '"Mi djast a damp, horni nabsaker !"';beep;call output;bong=1;end;call testabbo;if all="RESULT" then bong=1;busy on;if bong=0 then;do;if all= "No fileiddiz available" then
  45. do;address command 'bangerversion files "'||firstfiledir||firstfilename||'" quiet';if INTER=1 then;do;dope= lIl||'No File_ID.DIZ available...'lI'Paint one with DIZ-ED!'lI;head= '"Please continue..."';butt= '"Load Diz-Ed !"';if NODIZED=1 then;do;butt= '"Continue, please..."';skp=1
  46. end;call output;busy on;if tst=0 then;do;if skp~=1 then;do;address command '"'||dizpath||'" "'||firstfiledir||firstfilename||'"';address command 'wait 3 sec';do until ~show('P','REXX_DIZ-Ed');skipper=1
  47. end;end;end;end;bong=1;end;if bong=0 then;do;if INTER=1 then;do;getstring '"ComDizZ - `95 "'||IIl||'"/phn - 80 chars limit! Enter Comment:"' '"'all'"'
  48. all=result ;end;all=strip(left(delstr(all,1,0),79));address command 'filenote >nil: "'||firstfiledir||firstfilename||'" "'all'"';comcount=comcount+1;if DCHECK=1 then call makefile;end;end;address command 'delete >NIL: T:'||IIl||'.DIZ';call testabbo;if skipper~=1 then
  49. do;query updateflags;follow=bittst(d2c(result),1);if follow then scrolltoshow '"'firstfilename'"';selectfile '"'firstfilename'"' 0 1;displaydir;status 9 window;COUNT=result;if COUNT = 0 then master=1;end;end
  50. busy off;restore;call inway;exit 0;outway:;busy on;str.7='"7 |HTTP://134.28.37.10/~frank|"';otherwindow;str.0='"0 .--------------------------."';do i = 0 to 9;addfile str.i  '' '' '' '' 0 1
  51. end;displaydir;scrolltoshow str.0;otherwindow;return;inway:;address command 'resident >nil: "'||cpath||'bangerversion" remove';address command 'resident >nil: "'||cpath||'snatchdiz" remove';address command 'resident >nil: "'||cpath||'filenote" remove';address command 'resident >nil: "'||cpath||'delete" remove';address command 'resident >nil: "'||cpath||'date" remove';address command 'resident >nil: "'||lhapath||'" remove'
  52. otherwindow;busy on;do i = 0 to 9;removefile str.i 1;end;otherwindow;rescan;return;output:;remember;status 26
  53. old_okay = result;status 27;old_cancel = result;status 26 set head;status 27 set butt;busy on;request dope;tst=result;status 26 set old_okay;status 27 set old_cancel;restore
  54. return;testabbo:;busy on;toptext lll||' tO gO: '||count||' sTATUS: '||firstfilename;checkabort;ab=result;if ab=1 then;do;dope= lIl||'Quit? Now? Really? Sure? 100%?'lI;head= '"Yes, a 100%"';butt= '"Nope... Continue!"'
  55. call output;busy on;if tst=1 then;do;call inway;exit 0;end;end;return;makefile:;address command 'date >"'||comfile||'"'
  56. address command 'filenote >nil: "'||comfile||'" "Last time 'comcount' file/s were ComDizZed succesfully! ©STEELER/phanTasm`95"';return;dofileid:;if open('fileid','T:'||IIl||'.DIZ','read') then;do until eof('fileid');zeile.f=readln('fileid');all=all||zeile.f||' ';f=f+1;end;close('fileid');all=compress(all,'"´`''ªºð£¶¤þ¡¯%&$§()[]¬!Ц~/\|_<>{}-[]¹@³°¼½¾·«»-=.:#^+*,¸;÷®Å£Ø¥ø¿µ ');all=space(all,1);return