home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / cenvi29.zip / BOXFONT.CMD < prev    next >
OS/2 REXX Batch file  |  1994-03-08  |  1KB  |  43 lines

  1. EXTPROC CEnvi
  2. /************************************************************
  3.  *** BoxFont.cmd - Set and/or show the default values for ***
  4.  *** ver.1         OS/2 and DOS boxes                     ***
  5.  ************************************************************/
  6.  
  7. #include <Profile.lib>
  8.  
  9. main(argc,argv)
  10. {
  11.    // Get current size
  12.    BLObSize(current,2);
  13.    PrfQueryProfileData(HINI_USERPROFILE,"Shield","~Font Size...",current,2);
  14.    printf("Current Font Size = %d x %d\n",BLObGet(current,1,UWORD8),BLObGet(current,0,UWORD8));
  15.  
  16.    if ( argc != 1  &&  argc != 3 )
  17.       Instructions();
  18.    else if ( argc == 3 ) {
  19.       height = atoi(argv[1]), width = atoi(argv[2]);
  20.       if ( height < 1  ||  width < 1 )
  21.             Instructions();
  22.       else {
  23.          current[1] = height, current[0] = width;
  24.          PrfWriteProfileData(HINI_USERPROFILE,"Shield","~Font Size...",current,2);
  25.       }
  26.    }
  27. }
  28.  
  29. Instructions()
  30. {
  31.    printf("\n")
  32.    printf("BoxFont - Show and Set the default font size for DOS and OS/2 windows\n")
  33.    printf("\n")
  34.    printf("USAGE: BoxFont [Height Width]\n")
  35.    printf("\n")
  36.    printf("WHERE: Height & Width - Font height and width\n")
  37.    printf("\n")
  38.    printf("EXAMPLES: BoxFont 8 8      - Set to 8 x 8 font\n")
  39.    printf("          BoxFont 15 7     - Set to 15 x 7 font\n")
  40.    printf("\n")
  41. }
  42.  
  43.