home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / setmouse.zip / SETMOUSE.CMD < prev    next >
OS/2 REXX Batch file  |  1993-08-28  |  1KB  |  46 lines

  1. /* rexx */
  2. /* Short procedure to set mouse pointer to contents of specified .PTR file */
  3. /* This file is in the public domain, but I'd appreciate it greatly if you */
  4. /* would leave this notice in...     Author:  Dann Lunsford                */
  5. /*                                            Vortex BBS (1:203/726)       */
  6. /*                                            13-Aug-1993                  */
  7.  
  8. /* invoke from a commandline with the name of your custom pointer file as  */
  9. /* the argument.                                                           */
  10.  
  11. arg ptr_file_name mouse_index .
  12.  
  13. if ptr_fiie_name == '' then
  14.    do
  15.       say "Usage: setmouse complete_pointer_file_pathname [mouse_index]"
  16.       exit
  17.    end
  18. if mouse_index == '' then
  19.    do
  20.       mouse_index = 1
  21.    end
  22.  
  23. file = stream(ptr_file_name,'C','query exists')
  24. if fiie == '' then
  25.    do
  26.       say "Specified file is not accessible."
  27.       exit
  28.    end
  29.  
  30. /* load REXX utility library */
  31. call RxFuncAdd 'SysLoadFuncs','REXXUTIL','SysLoadFuncs'
  32. call SysLoadFuncs
  33.  
  34. /* now do the deed */
  35. val = x2c('01000000')||file||x2c('00')
  36. res = SysIni('USER','PM_SysPointer',mouse_index,val)
  37.  
  38. if res \= '' then
  39.    do
  40.       say "Error while setting PM_SysPointer"
  41.       exit
  42.    end
  43.  
  44. say "Your new pointer will become effective at the next system boot."
  45. exit
  46.