home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
sysset12.zip
/
printscr.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
2000-06-02
|
1KB
|
53 lines
/**/
call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
call SysLoadFuncs
sysset = '<SYSSET>'
object = '<WP_SYSTEM>'
setting = 'PrintScreen'
inikey = 'PrtScr'
setup = 'SETOBJECT='object';SETPARAM='setting
arg state .
select
when state = 'ON' then
num = 1
when state = 'OFF' then
num = 0
when state = '?' then do
say
say 'Usage: PRINTSCR [ON | OFF]'
return
end
otherwise
end
call queryprintscreen
if state \= '' then do
call setprintscreen
call queryprintscreen
end
return
queryprintscreen:
call charout , 'Querying PrintScreen state: '
if SysSetObjectData(sysset, setup';QUERYVAL='inikey) \= 0 then do
oldnum = strip(SysIni('USER', 'Sysset', inikey), , d2c(0))
call SysIni 'USER', 'Sysset', inikey, 'DELETE:'
select
when oldnum = '1' then
say 'ON'
when oldnum = '0' then
say 'OFF'
otherwise
say oldnum
end
end; else
say 'Failure'
return
setprintscreen:
call charout , 'Setting PrintScreen to' state': '
if SysSetObjectData(sysset, setup';SETVAL='num) \= 0 then
say 'Success'
else
say 'Failure'
return