Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Leave Only Footprints- Restore Environmental Settings

Usefull Functions & Procedures

Leave Only Footprints- Restore Environmental Settings

by  baltman  Posted    (Edited  )
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&
&&&&& Leave Only Footprints
&&&&&
&&&&& This Program Creates a PRG called
&&&&& only_footprints.prg that records
&&&&& (most of) the environmental settings.
&&&&&
&&&&& You can call this program as a function
&&&&& before changing settings for an app or prg,
&&&&& and as you exit your app or prg, run the
&&&&& only_footprints.prg to restore the
&&&&& environment to it's original settings.
&&&&&
&&&&& Please note that the _screen will clear
&&&&& due to the "SET STATUS" line, if you don't
&&&&& want this behavior, comment it out.
&&&&&
&&&&& Brian Altman
&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Code:
LcOrigConsole=SYS(2001,"Console")
SET CONSOLE OFF
SET TEXTMERGE ON TO only_footprints.prg
\SET DISPLAY TO <<SYS(2001,"DISPLAY")>>
\SET CLOCK <<SYS(2001,"CLOCK")>>
\SET TALK <<SYS(2001,"TALK")>>
\SET COMPATIBLE <<SYS(2001,"COMPATIBLE")>>
\SET PALETTE <<SYS(2001,"PALETTE")>>
\SET BELL <<SYS(2001,"BELL")>>
\SET SAFETY <<SYS(2001,"SAFETY ")>>
\SET ESCAPE <<SYS(2001,"ESCAPE ")>>
\SET LOGERRORS <<SYS(2001,"LOGERRORS")>>
\SET CARRY <<SYS(2001,"CARRY ")>>
\SET CONFIRM <<SYS(2001,"CONFIRM")>>
\SET BROWSEIMECONTROL <<SYS(2001,"BROWSEIMECONTROL")>>
\SET STRICTDATE TO <<SYS(2001,"STRICTDATE")>>
\SET EXACT <<SYS(2001,"EXACT")>>
\SET NEAR <<SYS(2001,"NEAR")>>
\SET ANSI <<SYS(2001,"ANSI")>>
\SET LOCK <<SYS(2001,"LOCK")>>
\SET FIXED <<SYS(2001,"FIXED")>>
\SET EXCLUSIVE <<SYS(2001,"EXCLUSIVE")>>
\SET MULTILOCKS <<SYS(2001,"MULTILOCKS")>>
\SET HEADINGS <<SYS(2001,"HEADINGS")>>
\SET DELETED <<SYS(2001,"DELETED")>>
\SET NULL <<SYS(2001,"NULL")>>
\SET NULLDISPLAY TO "<<SYS(2001,"NULLDISPLAY")>>"
\SET SPACE <<SYS(2001,"SPACE")>>
\SET OPTIMIZE <<SYS(2001,"OPTIMIZE")>>
\SET UNIQUE <<SYS(2001,"UNIQUE")>>
\SET CPDIALOG <<SYS(2001,"CPDIALOG ")>>
\SET REFRESH TO <<SYS(2001,"REFRESH")>>,<<SYS(2001,"REFRESH","REFRESH")>>
\SET ODOMETER TO <<SYS(2001,"ODOMETER")>>
\SET BLOCKSIZE TO <<SYS(2001,"BLOCKSIZE")>>
\SET REPROCESS TO <<SYS(2001,"REPROCESS")>>
\SET COLLATE TO "<<SYS(2001,"COLLATE")>>"
\SET HELP <<SYS(2001,"HELP")>>
\SET RESOURCE <<SYS(2001,"RESOURCE")>>
\SET SYSFORMATS <<SYS(2001,"SYSFORMATS")>>
\SET SECONDS <<SYS(2001,"SECONDS")>>
\SET CENTURY <<SYS(2001,"CENTURY")>>
\SET CURRENCY <<SYS(2001,"CURRENCY")>>
\SET CURRENCY TO <<SYS(2001,"CURRENCY",1)>>
\SET MEMOWIDTH TO <<TRANSFORM(SYS(2001,"memowidth"))>>
\SET HOURS TO <<SYS(2001,"HOURS")>>
\SET DATE TO <<SYS(2001,"DATE")>>
\SET DECIMALS TO <<SYS(2001,"DECIMALS")>>
\SET FDOW TO <<SYS(2001,"FDOW")>>
\SET FWEEK TO <<SYS(2001,"FWEEK")>>
\SET MARK TO "<<SYS(2001,"MARK")>>"
\SET SEPARATOR TO <<SYS(2001,"SEPARATOR")>>
\SET POINT TO <<SYS(2001,"POINT")>>
\SET STATUS <<SYS(2001,"status")>>
\SET STATUS BAR <<SYS(2001,"status bar")>>
\SET SYSMENU <<SYS(2001,"SYSMENU")>>
\SET ASSERTS <<SYS(2001,"ASSERTS")>>
\SET FULLPATH <<SYS(2001,"FULLPATH")>>
\SET DEVICE TO <<SYS(2001,"DEVICE")>>
\SET CONSOLE <<LcOrigConsole>>
\_screen.FontSize=<<TRANSFORM(_screen.FontSize)>>
\_screen.FontName="<<_screen.FontName>>"
\SET NOTIFY <<SYS(2001,"NOTIFY")>>
SET TEXTMERGE TO
SET TEXTMERGE OFF
compile only_footprints.prg
SET CONSOLE &LcOrigConsole
RETURN
&&& EOF &&&
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top