Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!ukc!icdoc!syma!grahamt From: grahamt@syma.sussex.ac.uk (Graham Thomas) Newsgroups: comp.sys.atari.st.tech Subject: How to write config info into mail .PRG or .ACC file? Message-ID: <3300@syma.sussex.ac.uk> Date: 21 Aug 90 11:55:09 GMT Sender: grahamt@syma.sussex.ac.uk Organization: SPRU, Univ. of Sussex, Brighton, UK Lines: 24 Could someone give me some tips on how to save (& of course load) configuration information to the program that uses it, while running that same program? I've seen lots of programs that do this - e.g. Charles Johnson's Little Green Selector & Arcshell, the Universal Item Selector, etc., and I'd like to do this myself. I've written a program (in Laser C) which sends various settings to my printer. It runs either as a .PRG or as an .ACC (I used Samuel Streeper's init file), and it uses a dialog box as its user interface. At present, the program sets the defaults I like (e.g. elite, draft, skip 4 lines at perfs, A4 page size) at startup time. I'm aware that my preferences aren't everybody's, and I'd like to let other people set their own defaults. My options are either to read from / write to a separate .CFG or .INF file, which I could do but would rather not (I've incorporated my resource file info into the main program file and I'd like to keep everything in a single place if possible), or save the info directly to the program itself. How is this done? Thanks in advance. Graham