
! script name: filing.d/execscrpt
! topic: execute a script

!A
!A NAME:
!A
!A 	Execute Script
!A
!A DESCRIPTION:
!A
!A 	This script will allow the selection of a script to be executed.
!A
!B INSTRUCTIONS:
!B
!B 	SELECT EXISTING SCRIPT: Select the script to be executed.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: execute script ")

DIM Answer$[256]
DIM Destination$[256]
DIM Name$[256]
DIM Dir$[256]
DIM D_label$[256]
DIM Sub_label$[256]
DIM F_label$[256]
DIM Choice$[256]
DIM Mask$[256]
DIM Group_name$[256]
DIM Gname$[256]
DIM Decision$[256]


Start:Dir$="/usr/weber/ascrpt/"
D_label$="DIRECTORY"
Sub_label$="SUB DIRECTORIES"
F_label$="FILES"
Choice$="FILE TO OPEN"
Mask$="*"

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

Name$=Answer$
A= POS(Name$,"/usr/weber/ascrpt/")
IF NOT A THEN Start
Name$= Name$[A+18]
PRINT Name$

LOAD Name$


Leave:!

LowerFileBox
Stat=SetInputFormat("n4","")

IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END

