home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / on-line / amicomsys / rexx / amicomsystest.rexx next >
OS/2 REXX Batch file  |  1998-07-14  |  2KB  |  60 lines

  1. /* ARexx script example for AmiComSys */
  2. /* Outputs every variable */
  3.  
  4. ADDRESS AMICOMSYS;
  5. OPTIONS RESULTS;
  6.  
  7. GET stem info. CLIENTLIST;
  8. /* "stem info." inserts the results to the structure 'info.'. */
  9. /* "var s" would have inserted all the results to one string in s. */
  10. /* "CLIENTLIST": We want to read the client list information. */
  11.  
  12. SAY ""
  13. SAY "Connected (0 = no, 1 = yes):" info.connected;
  14.  
  15. /* Only output the client info when we are connected to server */
  16. IF info.connected=1 THEN DO
  17.     SAY "Number of lines in list:" info.numclients;
  18.     SAY "Number of connected clients:" info.numconnected;
  19.     SAY "Selected client:" info.selected;
  20.     SAY "Local user:";
  21.     Say info.realname ' ('||info.login||') online' info.onlinetime;
  22.     Say 'Email:' info.email;
  23.     Say 'Homepage:' info.homepage;
  24.     Say 'FTPSite:' info.ftpsite;
  25.     Say 'Comment:' info.comment;
  26.  
  27.     /* Outputs the whole list of client info */
  28.     DO i=0 FOR info.numclients 
  29.         SAY "----" i+1 "-----";
  30.         SAY "Host:" info.hostnames.i;
  31.         SAY "Username:" info.usernames.i;
  32.         SAY "Realname:" info.realnames.i;
  33.         SAY "Comment:" info.comments.i;
  34.         SAY "HomePage:" info.homepages.i;
  35.         SAY "FTPSite:" info.ftpsites.i;
  36.         Say 'Online:' info.onlinetimes.i;
  37.     END;
  38.     SEND MSG info.login '"Nice eh.. ;)"'
  39. END;
  40.  
  41. /* Example of REQUEST and REQUESTA */
  42.  
  43. title='"This is a title"'
  44. text='"Hi there. Thanks for using AmiComSys"'
  45. buttons='"_Ok|_Yepp|_Hepp"'
  46. host='"/localhost/AmiComSys#?"'
  47.  
  48. REQUEST title buttons text
  49.  
  50. /* Same thing but with a non-blocking requester */
  51.  
  52. REQUESTA title buttons text
  53.  
  54. /* Same thing but with a non-blocking requester, with abbility to send a message */
  55. /* Send message to host localhost, and program AmiComSys */
  56.  
  57. REQUESTA title buttons text HOSTNAME host
  58.  
  59. EXIT;
  60.