home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / pmsw.zip / PMSW / PMSWALL.ZIP / USER / ATIPL.CMD next >
OS/2 REXX Batch file  |  1994-06-21  |  3KB  |  90 lines

  1. /* rexx */
  2. if 0 < RxFuncQuery('SysLoadFuncs') THEN DO;
  3.    Call rxfuncadd 'SysLoadFuncs','REXXUTIL','SysLoadFuncs';
  4.    Call SysLoadFuncs;
  5. END;
  6.  
  7. /* Switch desktop focus to ourself by name */
  8. '@MODE CO80,10'
  9. '@PMSW *AT IPL*'
  10. CALL BEEPATTN;
  11. /* Define highlight color, error color, normal color */
  12. HC="";EC="";NC=""
  13. call charout ,NC"H"
  14.  
  15. /* Prompt the user whether to start LAN requestor. */
  16. call charout , HC'HAtIPL: do you want to start requester? [y]/n 'EC'> 'NC;
  17. KeyScan=SysGetKey('NOECHO'); KeyCode=c2d(KeyScan);
  18. if KeyCode=27 then do; call Abandon; exit; end;
  19. if \(KeyCode=78 | KeyCode=110) then do;
  20.    call charout ,"Y";
  21.    '@START "StartReq" /C /min c:\user\startreq.cmd';
  22.    call charout , NC"5HStarted Network Requester";
  23. end;
  24. else call charout ,"N";
  25.  
  26. /* Prompt user to start TCP/IP interface.  Replace this with COMMMGR if no TCP. */
  27. call charout ,HC'HAtIPL: do you want to start TCP functions? [y]/n 'EC'> 'NC;
  28. KeyScan=SysGetKey('NOECHO'); KeyCode=c2d(KeyScan);
  29. if KeyCode=27 then do; call Abandon; exit; end;
  30. if \(KeyCode=78 | KeyCode=110) then do;
  31.    call charout ,"Y";
  32.    '@START "StartTCP" /c /min C:\USER\STARTTCP.CMD';
  33.    call charout , NC"5HStarted TCP services starter.";
  34. end;
  35. else call charout ,"N";
  36. call charout , EC'5H── AtIPL completed ──'NC;
  37. Call SysSleep 3;
  38.  
  39. /* Start other local applications here.  MemSize is PM memory monitor. */
  40. '@PMSW "*Resources*" /r';
  41. if RC \= 1 then do;
  42.    Call SysSetObjectData '<MEMSIZE>','OPEN=DEFAULT;'
  43.    '@c:';'@cd \user';'@Start /C /MIN BRUCEOPN.CMD'
  44. end;
  45. '@PMSW "*ACCENT*" /r';
  46. if RC \= 1 then '@start "AccentPM" /pm accentpm'
  47. call charout ,""
  48. '@exit'; RETURN;
  49.  
  50. Abandon:
  51.    call charout ,"";Call SysSleep 1;
  52.    call charout ,"20H*** ABORTED ***";
  53.    CALL SysSleep 2;
  54.    Call charout ,""
  55.    return;
  56.  
  57. BeepAttn: procedure
  58.    /* C scale */
  59.    note.1 = 262    /* middle C */
  60.    note.2 = 294    /*    D     */
  61.    note.3 = 330    /*    E     */
  62.    note.4 = 349    /*    F     */
  63.    note.5 = 392    /*    G     */
  64.    note.6 = 440    /*    A     */
  65.    note.7 = 494    /*    B     */
  66.    note.8 = 524    /*    C     */
  67.    duration = 64
  68.    dur.1  = duration
  69.    duration = reduce(duration)
  70.    dur.2  = duration
  71.    duration = reduce(duration)
  72.    dur.3  = duration
  73.    duration = reduce(duration)
  74.    dur.4  = duration
  75.    duration = reduce(duration)
  76.    dur.5  = duration
  77.    duration = reduce(duration)
  78.    dur.6  = duration
  79.    duration = reduce(duration)
  80.    dur.7  = duration
  81.    duration = reduce(duration)
  82.    dur.8  = duration
  83.    do i=1 to 8
  84.      call beep note.i,dur.i
  85.    end
  86.    return
  87. reduce: procedure
  88.    arg factor
  89.    return   (factor*3)%4
  90.