Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to save all SET settings?
Message
From
01/10/2004 14:02:20
 
 
To
01/10/2004 11:57:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00947972
Message ID:
00948033
Views:
20
>Is there a command/function to save all SET settings, e.g. BELL, TALK, EXCLUSIVE, EXACT, etc. in an array/file? I would like save current settings, make changes and then restore settings while running a program.
>
>Thanks.

This is not complete, but it is short:
CLEAR
PRIVATE aSet,aSubSet,aSubSet2,i,k,j,sSet
DIMENSION aSet[50*2],asubSet2[1]
tmpFile=ADDBS(SYS(2023))+SYS(2015)+'.tmp'
LIST STATUS TO FILE (m.tmpFile) NOCONSOLE
=ALINES(aStatus,FILETOSTR(m.tmpFile))
ERASE (m.tmpFile)
sSet=''
FOR k=29 TO 33
	sSet=m.sSet + aStatus[m.k]
NEXT
i=1
FOR k=1 TO ALINES(aSubSet,m.sSet," - ")
	i=m.i+ACOPY(asubSet2,aSet,1,ALINES(asubSet2,STRTRAN(aSubSet[k],' ',CHR(13),1,1),.T.),m.i)
NEXT
DIMENSION aSet[BITRSHIF(m.i,1),2]
ASORT(aSet,1)
FOR k=1 TO ALEN(aSet,1)
	? aSet[m.k,1],aSet[m.k,2]
NEXT
Previous
Reply
Map
View

Click here to load this message in the networking platform