home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / gtirc306.zip / REXXSCR.CMD < prev    next >
OS/2 REXX Batch file  |  1997-11-24  |  4KB  |  70 lines

  1. /*********************************************************************/
  2. /* REXXSCR.CMD   GammaTech IRC Sample REXX Stand Alone Script        */
  3. /*********************************************************************/
  4. /*                                                                   */
  5. /* This is a sample REXX script for use with GammaTech IRC. It is    */
  6. /* executed using the /SCR or /REXX command from the GtIrc command   */
  7. /* line or toolbar icon.                                             */
  8. /*                                                                   */
  9. /* This sample generates a /SOUND command to play a *.wav file on    */
  10. /* the speified client and display a hello message.                  */
  11. /*                                                                   */
  12. /* Warning: Do not change this script. Copy it to another name       */
  13. /* and modify the copy for backup purposes.                          */
  14. /*                                                                   */
  15. /*********************************************************************/
  16. /*                                                                   */
  17. /* Entry arguments:                                                  */
  18. /*                                                                   */
  19. /* Arg 1 - Window Handle                                             */
  20. /* Arg 2 - Your Nickname                                             */
  21. /* Arg 3 - Window Name                                               */
  22. /* Arg 4 - Command line parameters if any                            */
  23. /*                                                                   */
  24. /* The Window Name parameter will contain one of the following:      */
  25. /*                                                                   */
  26. /*  * Channel name if the command is executed from a channel         */
  27. /*    window. In this case the first character will be a # or &.     */
  28. /*                                                                   */
  29. /*  * Other clients nick name if the command is executed from a      */
  30. /*    query window. The first character will not be #, & or !.       */
  31. /*                                                                   */
  32. /*  * If the command is executed from any other type of window       */
  33. /*    this parameter will contain a !.                               */
  34. /*                                                                   */
  35. /*********************************************************************/
  36. /*                                                                   */
  37. /* There are external REXX functions you may use in this REXX        */
  38. /* procedure which are described in the online help under Script     */
  39. /* programming. A summary of those functions is shown below:         */
  40. /*                                                                   */
  41. /* IrcRexxDisplay(text,win)          Display text in a window.       */
  42. /* IrcRexxCommand(text,win)          Send text or /comamnd to IRC    */
  43. /* IrcRexxSend(text,win)             Send raw text to server.        */
  44. /* IrcRexxVariable(win,name[,value]) Query or set an IRC variable.   */
  45. /* IrcRexxWildCard(wildcard,string)  Check for wildcard match.       */
  46. /*                                                                   */
  47. /*********************************************************************/
  48. Parse Upper Arg WinHandle WinName OurNick Parm1 Parms
  49.  
  50. Pool = 'OS2ENVIRONMENT'
  51.  
  52. /*********************************************************************/
  53. /*                                                                   */
  54. /* Generate a /Sound command to the nickname specified in Parm1      */
  55. /* using a hard coded wav file and message text.                     */
  56. /*                                                                   */
  57. /*********************************************************************/
  58.  
  59. if (Parm1 <> '') then do
  60.    OutStr = "/SOUND " Parm1 "dragon.wav Hello !!!"
  61.    IrcRexxCommand(OutStr,WinHandle)
  62. end
  63.  
  64. else do
  65.    IrcRexxDisplay("*** Missing nickname ***",WinHandle)
  66. end
  67.  
  68. Return ""
  69.  
  70.