home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Multimed / Multimed.zip / lbmix04.zip / Source / dlgpatch.cmd < prev    next >
OS/2 REXX Batch file  |  2000-05-07  |  791b  |  28 lines

  1. /* Patch the dialog include file for LBMix */
  2. in="Dialogs.dlg"
  3. out="Dialogs-patched.dlg"
  4.  
  5. if stream(in,'c','query exists')='' then do
  6.    say 'File' in 'not found.'
  7.    exit
  8.    end
  9. if stream(out,'c','query exists')<>'' then '@del' out
  10.  
  11. do while chars(in)<>0
  12.    Next=linein(in)
  13.    if word(Next,1)='DLGINCLUDE' then do
  14.       Next=left(Next,wordindex(Next,3)-2) '"LBMixRes.h"'
  15.       end
  16.    else if word(Next,1)='NOTEBOOK' then do
  17.       i=length(Next)-pos(',',reverse(Next))+1
  18.       Next=left(Next,i) 'BKS_TABBEDDIALOG | WS_GROUP'
  19.       call lineout out,Next
  20.       do until (left(word(Next,1),4)<>'BKS_')&(left(word(Next,1),3)<>'WS_')
  21.          Next=linein(in)
  22.          end
  23.       end
  24.    call lineout out,Next
  25.    end
  26. call stream in,'c','close'
  27. call stream out,'c','close'
  28.