home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 April / PCO_04_97.ISO / filesbbs / os2 / bos2_xr4.arj / THOMAS.ZIP / startf.cmd < prev    next >
Encoding:
Text File  |  1996-12-23  |  1.7 KB  |  65 lines

  1. /* STARTPF - START at Position with Font */
  2.  
  3. Parse Upper arg arg1 .
  4.  
  5. Parse arg '"'title'"' font runcmd
  6.  
  7. Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  8. Call SysLoadFuncs
  9.  
  10. If Pos('X', translate(font))>0 Then
  11.   Do
  12.     Parse Upper Value font With fh 'X' fw
  13.     fontsize=d2c(fw*256+fh)
  14.   End
  15. Else
  16.   Signal Help
  17.  
  18. tag.0      = 2                      /* 2 languages are configured */
  19. tag.1.lang = 'DEUTSCH'
  20. tag.1.tag  = 'Schrif~tartgröße...'
  21. tag.2.lang = 'ENGLISH'              /* language */
  22. tag.2.tag  = '~Font Size...'        /* entry to change in this language */
  23.  
  24. found=0
  25. do i=1 to tag.0
  26.   result=SysIni('USER', 'Shield', tag.i.tag)  /* search correct language */
  27.   if result\='ERROR:' then
  28.     do
  29.       found=1
  30.       leave
  31.     end
  32. end
  33.  
  34. if found=1 then
  35.   do
  36.     say 'Using Language' tag.i.lang'.'
  37.     savesize=SysIni('USER', 'Shield', tag.i.tag) /* save user ini font size  */
  38.     call SysIni 'USER', 'Shield', tag.i.tag, fontsize   /* modify font size  */
  39.     if title\="" then
  40.       '@START "'title'" /WIN /N' runcmd                 /* run!              */
  41.     else
  42.       '@START           /WIN /N' runcmd                 /* run!              */
  43.     call SysIni 'USER', 'Shield', tag.i.tag, savesize   /* restore font size */
  44.   end
  45. else
  46.   do
  47.     say 'Could not determine OS/2 language - aborting ...'
  48.     call SysSleep 5
  49.     exit 1
  50.   end
  51. Exit 0
  52.  
  53. Help:
  54.   Say 'STARTF - START with selected font'
  55.   Say 'Freeware by Thomas Waldmann, using SETWIN of Michael Thompson.'
  56.   Say
  57.   Say 'Usage: startpf "title" font'
  58.   Say
  59.   Say '  title    = Window title (may be empty if program does this setting)'
  60.   Say '  font     = Font for window (8x8, 10x6, ...)'
  61.   Say
  62.   call charout ,'Press any key to exit ...'
  63.   Pull Dummy
  64.   Exit 1
  65.