
! script name: vstrategy.d/liststrategy
! var_topic: list variational strategy file

!A
!A NAME:
!A
!A      List variational strategy file
!A
!A DESCRIPTION:
!A
!A      List variational strategy file
!A
!B INSTRUCTIONS:
!B
!B 	This script lists the strategy file. The file is listed
!b	in ASCII format.
!B
!# see also - htdocs/help.d/strategy.htm
!# see also - htdocs/help.d/vdminfo.htm

Stat=ChangeLabelStr("ScriptNameStatus","Function: List variational strategy")

DIM Destination$[256]
DIM Answer$[256]
DIM Filename$[256]
DIM Descr$[256]
DIM Ques$[256]
DIM Dir$[256]
DIM Dname$[256]
DIM D_label$[256]
DIM Sub_label$[256]
DIM F_label$[256]
DIM Choice$[256]
DIM Mask$[256]



Start:!
stat= NamedVarStr("strategy directory",WsStrategyVars,"/usr/weber/database/strategies/",Dir$)
D_label$="DIRECTORY"
Sub_label$="SUB DIRECTORIES"
F_label$="STRATEGY FILES"
Choice$="STRATEGY FILE"

Stat=UserFileBox(Dir$,Mask$,D_label$,Sub_label$,F_label$,Choice$)
Stat=SetInputFormat("a99","")
Stat=GetValue("SELECT STRATEGY FILE",Answer$)
IF (ExitScript(Destination$)) THEN Leave
IF Answer$= "CANCEL" THEN Leave
LowerFileBox
Filename$= Answer$

Stat= CopyFile(Filename$,"tempdata")
IF Stat=1 THEN Start
Stat=MessageFileBox("tempdata",Filename$)


GOTO Start


Leave:!
LowerFileBox
Stat=SetPickMask(WsPickGeometry)
IF NOT LEN(Destination$) THEN
	LOAD "typecontrol"
ELSE
	LOAD Destination$
END IF
END

