Vielleicht interessiert es ja sonst noch jemanden:
Aus news:comp.lang.rexx
Betreff: Re: Changing Object Class in OS/2
Datum: Sat, 05 May 2001 20:57:42 +0200
Russell O'Connor wrote:
>
> Does anyone know what REXX system commands I can call in order to
> change an object type? For example to turn a MMWAV object into
> an MMAUDIO object.
There are no REXX functions to do this as easy as with the settings
page in Warp 4.
Therefore you must create a new (empty) object and add the data of
the old object.
/* REXX */
say
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
/* Get old object */
OldObject = stream( 'Test.wav', 'c', 'query exists' )
if OldObject = '' then
return
Title = filespec( 'n', OldObject )
Location = directory( OldObject'..' )
TempTitle = Title'.temp'
TempObject = strip( Location, 'T', '' ) || ''TempTitle
Class = 'MMAudio'
Setup = ''
/* Rename old object to *.temp */
'ren 'OldObject' 'TempTitle
/* Create new empty object with old object title */
ret = SysCreateObject( Class, Title, Location, Setup, 'R' )
/* Add temp object to new empty object */
'copy 'OldObject' + 'TempObject' /b 'OldObject
/* Delete temp object */
call SysDestroyObject TempObject
return
--
Andreas Schnellbacher
[ Leser: 35 ] |