home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / arexx / moos / demos / rexx_misc.rexx < prev    next >
OS/2 REXX Batch file  |  1997-03-25  |  2KB  |  101 lines

  1. /*
  2.  * rexx_[SUB].library
  3.  *
  4.  * Test file...
  5.  */
  6.  
  7. OPTIONS RESULTS
  8. lib = 'rexxMOOS.library'; IF ~SHOW('L',lib) THEN CALL ADDLIB(lib,100,-30)
  9.  
  10.                                                                               
  11. /*
  12.  *    WriteClip()
  13.  */
  14. CALL print(4,'#',"WriteClip(text,options)")
  15.  
  16. str = 'MOOS: "The" ARexx library'
  17. CALL print(20,'-','WriteClip('''str''')')
  18. SAY WriteClip(str)
  19.  
  20. /*
  21.  *    ReadClip()
  22.  */
  23. CALL print(4,'#',"ReadClip(options)")
  24.  
  25. CALL print(20,'-','ReadClip()')
  26. SAY ReadClip()
  27.  
  28.                                                                               
  29. /*
  30.  *    Phonemes()
  31.  */
  32. CALL print(4,'#',"Phonemes()")
  33.  
  34. str = 'MOOS: "The" ARexx library'
  35. CALL print(20,'-','Phonemes("'str'")')
  36. SAY Phonemes(str)
  37.  
  38.                                                                               
  39. /*
  40.  *    Speak()
  41.  */
  42. CALL print(4,'#',"Speak(string,options)")
  43.  
  44. opt = 'rate 100'
  45. str = "This is Amiga speaking!"
  46. CALL print(20,'-','Speak("'str'",'''opt''')')
  47. CALL Speak(str,opt)
  48.  
  49. opt = 'enth 200'
  50. CALL print(20,'-','Speak("'str'",'''opt''')')
  51. CALL Speak(str,opt)
  52. SAY "Don't try to read what you've to listen... :-)"
  53.  
  54.                                                                               
  55. /*
  56.  *    WBInfo()
  57.  */
  58. CALL print(4,'#',"WBInfo(pathname)")
  59.  
  60. CALL print(20,'-','WBInfo("")')
  61. SAY WBInfo("")
  62.  
  63.                                                                               
  64. /*
  65.  *    GetMouse()
  66.  */
  67. CALL print(4,'#',"GetMouse(options)")
  68.  
  69. opt = "PosX"
  70. CALL print(20,'-','GetMouse('''opt''')')
  71. SAY GetMouse(opt)
  72.  
  73. opt = "PosY"
  74. CALL print(20,'-','GetMouse('''opt''')')
  75. SAY GetMouse(opt)
  76.  
  77.                                                                               
  78. /*
  79.  *    GetUniqueID()
  80.  */
  81. CALL print(4,'#',"GetUniqueID()")
  82.  
  83. CALL print(20,'-','GetUniqueID()')
  84. SAY GetUniqueID()
  85.  
  86. CALL print(20,'-','GetUniqueID()')
  87. SAY GetUniqueID()
  88.  
  89.                                                                               
  90.  
  91. ADDRESS COMMAND 'Wait' 2
  92.  
  93. SAY
  94. EXIT 0
  95.  
  96. print: PROCEDURE
  97.     PARSE ARG pos,char,str
  98.     IF char = '#' THEN SAY '0a0a'x
  99.     SAY COPIES(char,pos) || OVERLAY(" "str" ",COPIES(char,78 - pos))
  100.     RETURN
  101.