home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / internet / stricq / rexx / ParseICQMessage.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1998-10-06  |  844 b   |  40 lines

  1. /*
  2.  
  3.   ParseICQMessage.rexx - An example of how to parse an ICQ message
  4.  
  5.   $VER: ParseICQMessage.rexx v1.0 06.10.98 Copyright (C) 1998 Douglas F. McLaughlin
  6.  
  7.   Written By: Douglas F. McLaughlin 
  8.  
  9.   Note: URL messages seperate the description from the URL by a ASCII 254 (0xFE).
  10.         It is the responsibility of the ARexx script to delete the file after
  11.         all processing is done.  Each filename will be unique to each message
  12.         so that no filename collisions will occur.
  13.  
  14.   Note2: Permission is granted to use this script in any form or make any modifications
  15.          as necessary.
  16.  
  17. */
  18.  
  19. inp = 'input'
  20.  
  21. parse arg uin file
  22.  
  23. say 'Message is from 'uin
  24.  
  25. if ~open(inp,file,'r') then do
  26.   say 'Could not open file 'file'.'
  27.   exit 10
  28. end
  29.  
  30. do while ~eof(inp)
  31.   line = readln(inp)
  32.   say line
  33. end
  34.  
  35. call close(inp)
  36.  
  37. call delete(file)
  38.  
  39. exit 0
  40.