home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / sema4.zip / semaphor / main / form.1 < prev    next >
Text File  |  1994-02-17  |  1KB  |  40 lines

  1. Arg window 
  2.  
  3. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  4. Call SysLoadFuncs
  5.  
  6. rc=RxFuncAdd('VpUtilLoadFuncs','VpUtil', 'VpUtilLoadFuncs')
  7. CALL VpUtilLoadFuncs
  8.  
  9. result = SysDriveMap('C:', 'USED')
  10. parse var result drive results
  11. drives.1 = drive
  12. count=1
  13. DO WHILE results <> ''
  14.    count=count+1
  15.    parse var results drive results
  16.    drives.count = drive
  17.    END
  18.    
  19. /* Add items from list  Spin Button */
  20. drives.0 = count
  21. index=VpAddItem(window, 1000, 'LIST', 'DRIVES.')
  22.  
  23. /*Get item value  Spin Button */
  24. CURRENT_DRIVE = VpGetItemValue(window,1000)
  25.  
  26. /* The following two lines set an application variable equal to the 
  27. ** current drive.  This information is used to set the current Swap file
  28. ** size data.   */
  29. os_drive=left(SysSearchPath('PATH','CMD.EXE'),2)
  30. CALL VPAppVariable "SET","OSDRIVE",os_drive
  31.  
  32. /* Create an unnamed event semaphore */
  33. SWAPID=VpSemaphore("EVENT","CREATE",'',0)
  34.  
  35. /* Create a new thread and run the event semaphore */
  36. TID=VpThread("START",0,"SWAPINFO.CMD",window,SWAPID)
  37.  
  38. /* Set range INTERVAL Spin Button */
  39. CALL VpSetRange window,'INTERVAL',1,100  /* Set spin button range*/
  40.