home *** CD-ROM | disk | FTP | other *** search
EPOC OPL Source | 1998-08-30 | 1.4 KB | 45 lines |
-
-
- Rem Contrast, an addon command for Shell5
- Rem Set the screen contrast
- Rem
- Rem Copyright (C) 1998 Nick Murray
- Rem
- Rem This program is free software; you can redistribute it and/or
- Rem modify it under the terms of the GNU General Public License
- Rem as published by the Free Software Foundation; either version 2
- Rem of the License, or (at your option) any later version.
- Rem
- Rem This program is distributed in the hope that it will be useful,
- Rem but WITHOUT ANY WARRANTY; without even the implied warranty of
- Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- Rem See the GNU General Public License for more details.
- Rem
- Rem You should have received a copy of the GNU General Public License
- Rem along with this program; if not, write to the Free Software Foundation,
- Rem Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- Rem
- INCLUDE "System.oxh"
- PROC contrast%:(n%)
- LOCAL Max%,Lev%
- ONERR ErrTrap::
- Max%=MAXDISPLAYCONTRAST&:
- IF n%<>2
- Usage::
- PRINT "Usage: contrast <0-";Max%;">"
- ELSE
- Lev%=VAL(PEEK$(argv&(2)))
- IF Lev%>Max%
- GOTO Usage::
- ENDIF
- SETDISPLAYCONTRAST:(Lev%)
- ENDIF
- RETURN
- ErrTrap::
- ONERR off
- PRINT err$:(ERR)
- RETURN ERR
- ENDP
-
-
-