🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.misc
4 messages
4 total messages Started by Dennis K. C. Woo Mon, 26 Jun 1995 00:00
Hey OS2 Gurus! How to do these...?
#17193
Author: Dennis K. C. Woo
Date: Mon, 26 Jun 1995 00:00
16 lines
1528 bytes
Hi, 

Presently, I use ROBOSAVE to backup and restore my desktop. Is there a way
that I can backup and restore the color schemes and the placement of all the 
objects separately?

Thanks in advance.

Dennis
*****************************************************************
*  Dennis Woo              Department of Mechanical Engineering *
*  E-mail: dwoo@unb.ca     University of New Brunswick          *
*  Office Tel: (506) 453-4513                 --------  __o     *       
*  Voice mail: (506) 453-0614                -------  _`\<,_    *
*  FAX       : (506) 453-5025               -------  (*)/ (*)   *
*****************************************************************	
Re: Hey OS2 Gurus! How to do these...?
#17191
Author: mbfay
Date: Tue, 27 Jun 1995 00:00
22 lines
1761 bytes
In <3snfk1$hps@sol.sun.csd.unb.ca>, dwoo@jupiter.sun.csd.unb.ca (Dennis K. C. Woo) writes:
-Hi, 
-
-Presently, I use ROBOSAVE to backup and restore my desktop. Is there a way
-that I can backup and restore the color schemes and the placement of all the 
-objects separately?
-
-Thanks in advance.
-
-Dennis
-*****************************************************************
-*  Dennis Woo              Department of Mechanical Engineering *
-*  E-mail: dwoo@unb.ca     University of New Brunswick          *
-*  Office Tel: (506) 453-4513                 --------  __o     *       
-*  Voice mail: (506) 453-0614                -------  _`\<,_    *
-*  FAX       : (506) 453-5025               -------  (*)/ (*)   *
-*****************************************************************	

        Look up the Warp Archive feature and see if that does what you want.

Mark Fay
Home OS/2 User
Re: Hey OS2 Gurus! How to do these...?
#17192
Author: Todd A. Scalzott
Date: Wed, 28 Jun 1995 00:00
158 lines
5076 bytes
In article <3snfk1$hps@sol.sun.csd.unb.ca> dwoo@jupiter.sun.csd.unb.ca
(Dennis K. C. Woo) writes:

> Presently, I use ROBOSAVE to backup and restore my desktop. Is there a way
> that I can backup and restore the color schemes and the placement of all the 
> objects separately?
> 

I hacked this out for color schemes once upon a time:

/*
 *  REXX Application to save all Workplace Shell color schemes
 *  to a file for later restoration.
 *
 *  During a backup operation, all applications and key values for
 *  the schemes are written out to the file specified by the variable
 *  scheme_file.  If the file currently exists, it is renamed to a 
 *  .OLD extension before processing continues.
 * 
 *  Format of the file is successive lines of:
 *      ApplicationName;ApplicationKey;KeyValue
 *
 *  e.g.: 
 *      PM_System_Colors;WindowStaticText;0 0 128
 *
 *
 *  Copyright 1994, Todd A. Scalzott
 *
 *  Placed in the public domain provided this header and the program
 *  banner remains intact.
 *
 *  Please forward modifications/comments/suggestions to 
 *  scalzott@netcom.com
 */

call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs

signal on halt name aborted

parse upper arg operation

version = '1.0'
scheme_file = "schemes.dat"

call banner

/* Operation to be a backup? */
if operation = 'BACKUP' then do
    call do_backup
    exit
end

/* Operation to be a restore? */
if operation = 'RESTORE' then do
    call do_restore
    exit
end

/* Neither...give some help */
say 'Use the command "SCHEME backup" to backup your Scheme settings'
say 'or "SCHEME restore" to restore them.'
say ''
say 'All Scheme setting will be written to or read from the file'
say scheme_file' in the current directory.'
say ''
exit

/*
 *  Produce our banner 
 */
banner:
say ' '
say 'SCHEME v'version' - Backup/Restore Workplace Shell Scheme settings'
say 'Copyright 1994, Todd A. Scalzott'
say ' '
return


/*
 *  Perform a backup of the current color scheme settings
 */
do_backup:
say 'Backing up your current Scheme settings to '||scheme_file||':'

/* delete .old, rename original to .old */
'@del 'substr(scheme_file,1,length(scheme_file)-4)||".old"
'@ren 'scheme_file substr(scheme_file,1,length(scheme_file)-4)||".old"

call lineout scheme_file,,1  /* open data file for writing */

say '  Getting the list of INI applications and keys...'
call SysIni 'SYSTEM', 'All:', "apps."

if Result \= 'ERROR:' then
    do i = 1 to apps.0
        if (substr(apps.i,1,3) = "PM_") &,
              (substr(apps.i,length(apps.i)-6,6) = "_Color") then do
            say "    Found scheme "||apps.i||"."
            call SysIni 'SYSTEM', apps.i, "All:", "keys."
            if Result \= 'ERROR:' then
                do j = 1 to keys.0
                    val = SysIni('SYSTEM', apps.i, keys.j)
                    line = apps.i||";"||keys.j||";"||val
                    call lineout scheme_file, line
                end
        end
    end

call lineout scheme_file    /* close */
return

/*
 *  Restore the current scheme settings from the scheme file
 *
 *  Not as robust as it should be, since it will blindly attempt
 *  to restore values contained within the scheme file
 */
do_restore:

call SysFileTree scheme_file, 'file', 'O'
if file.0 = 0 then do
    say 'Cannot locate 'scheme_file
    exit
end

say 'Restoring your Scheme settings from '||scheme_file||':'

last_app = ""

do while lines(scheme_file)
    line = linein(scheme_file)
    if line = '' then iterate                /* skip blank lines */
    if substr(line,1,1) = ";" then interate  /* skip any comment lines */

    parse var line app ";" key ";" val

    if (substr(app,1,3) = "PM_") &,
         (substr(app,length(app)-6,6) = "_Color") then do
        if (app <> last_app) then do 
            say "  Restoring scheme "app
        end
        call SysIni 'SYSTEM', app, key, val
        last_app = app
    end
    
end

return


aborted:
say "Scheme aborted."
--
Todd A. Scalzott, Systems Programmer   todd@kastle.com / scalzott@netcom.com
Kastle Development Associates          ...!netcom!friend!todd  
Team OS/2
Re: Hey OS2 Gurus! How to do these...?
#17190
Author: mbfay
Date: Tue, 04 Jul 1995 00:00
9 lines
995 bytes
In <TODD.95Jun28072942@todd.kastle.com>, todd@kastle.com (Todd A. Scalzott) writes:

        Look up Archiver in the index of your Warp users manual. I think that
will do the trick.


Mark Fay
Home
OS/2 User
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads