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

  1. /*********************************************************************/
  2. /* REXXAWAY.CMD  GammaTech IRC Sample REXX Stand Alone Script        */
  3. /*********************************************************************/
  4. /*                                                                   */
  5. /* This script is supported only on GtIrc version 3.0 and above.     */
  6. /*                                                                   */
  7. /* This is a sample REXX script for use with GammaTech IRC. It is    */
  8. /* executed by an idle timer event such that it is called when ever  */
  9. /* client idle time exceeds a specified value.                       */
  10. /*                                                                   */
  11. /* To activate this script enter the following or similar command:   */
  12. /*                                                                   */
  13. /*    /timer idle 300 /rexx rexxaway.cmd Automatically set away.     */
  14. /*                                                                   */
  15. /* Note that you can have this command executed automatically when   */
  16. /* you start GtIrc via use of the Initialize Rexx exit script        */
  17. /* found on the Startup Dialog.                                      */
  18. /*                                                                   */
  19. /* This script sets the client away automatically but silently.      */
  20. /*                                                                   */
  21. /*********************************************************************/
  22. /*                                                                   */
  23. /* Entry arguments:                                                  */
  24. /*                                                                   */
  25. /* Arg 1 - Window Handle                                             */
  26. /* Arg 2 - Your Nickname                                             */
  27. /* Arg 3 - Window Name                                               */
  28. /* Arg 4 - Command line parameters if any                            */
  29. /*                                                                   */
  30. /*********************************************************************/
  31. /*                                                                   */
  32. /* There are external REXX functions you may use in this REXX        */
  33. /* procedure which are described in the online help under Script     */
  34. /* programming. A summary of those functions is shown below:         */
  35. /*                                                                   */
  36. /* IrcRexxDisplay(text,win)          Display text in a window.       */
  37. /* IrcRexxCommand(text,win)          Send text or /comamnd to IRC    */
  38. /* IrcRexxSend(text,win)             Send raw text to server.        */
  39. /* IrcRexxVariable(win,name[,value]) Query or set an IRC variable.   */
  40. /* IrcRexxWildCard(wildcard,string)  Check for wildcard match.       */
  41. /*                                                                   */
  42. /*********************************************************************/
  43. Parse Arg WinHandle WinName OurNick Parms
  44.  
  45. Pool = 'OS2ENVIRONMENT'
  46.  
  47. if (IrcRexxVariable(WinHandle,"$AWAY") = "HERE") then do
  48.    if(Parms = '') then do
  49.       Parms = 'Automatically set away.'
  50.    end
  51.  
  52.    Text = '/away' Parms
  53.    IrcRexxCommand(Text,WinHandle)
  54. end
  55.  
  56. Return ""
  57.  
  58.