[futurebasic] Re: Installer avoidance

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1997 : Group Archive : Group : All Groups

From: tatewake@... (Terence Jordan)
Date: Sat, 22 Nov 1997 00:25:08 -0400
It was on the Staz site that I saw functions for getting the volrefnum of
the Preferences folder on the system. (No localization needed, either, i
believe!) at that point, to copy your prefs from your current directory to
the preferences directory...:

dim inp$;255 'important, needs to be here.
dim one$;1   ' again, important
open "ID",1,"terences prefs",255,CurDirRefNum% 'need to figure refnumbers
open "OD",2,"terences prefs",255,PrefRefNum%   'on your own.
 yy = LOF(1)
 zz = INT(yy/255)
 ex = yy - (zz*255)
 for xx=1 to zz
  input #1,inp$
  print #2,inp$;
 next xx
 long if ex<>0
  for xx=1 to ex
   input #1,one$
   print #2,one$;
  next xx
 end if
close

And to copy the resource fork, do the same operation, only with "IR" and "OR"...

Yeah, no error checking was done on the above routine, but I've done it
before in the past... just need to dig it up.

I'm leaving out info for copying the "salad" fork; but you may as well just
use Rick's routines for changing filetype/creator; that's all you probably
need anyway.

(Now that I think of it, you may find "FN CopyFiles" more useful.)



-- Terence Jordan (tatewake@...)
Inspired Software. http://inspired.netstreet.net/
Macintosh, Dos, Windows, and BeOS software solutions.
Phone: 407-728-7563
............................................
. New: Renegade Space Ninja for Macintosh! .
.      Visit our page for more info.       .
............................................