*************
* Deck "FREQ.sub"
*************

*************
* Card(s) in deck.
*  Card "ABOUT"
*  Card "Ftype"
*  Card "HELP"
*  Card "INPUT"
*  Card "LIST"
*  Card "LOG"
*  Card "QUIT"
*  Card "REQ"
*  Card "STATUS"
*************
* 9 Card(s), 9 were printed.
*************

*************
* Natural order of Cards
*  Card "REQ"
*  Card "INPUT"
*  Card "QUIT"
*  Card "ABOUT"
*  Card "STATUS"
*  Card "LIST"
*  Card "HELP"
*  Card "Ftype"
*  Card "LOG"
*************

*************
* Global Routine(s) in deck.
*  Routine "DISK"
*  Routine "GD"
*************
* 2 Global routines(s), 2 were printed.
*************

*************
* Card "ABOUT"
	NoAttach
	Window "UserWindow"
		Definition
			Origin 67,21
			Size 500,125
			Title "         \\//ortex - Copyright © 1997 Joey McDonald"
			NumberOfColors 4
			DefaultColors 0,1,0
			WindowObjects DRAGBAR 
			WindowFlags ACTIVATE TOFRONT 
			VisualEffects NONE ,WAIT 
		EndScript
	EndObject
	ImageButton "ABOUT"
		Definition
			Origin 4,11
			Image "DTP:EZ-UU/ABOUT5.brush"
			Shape "DTP:EZ-UU/ABOUT5.brush"
			Highlight NONE 
			ButtonFlags NONE 
		EndScript
		OnClick
			Quit
		EndScript
	EndObject
* End of Card "ABOUT"
*************

*************
* Card "Ftype"
	NoAttach
	BeforeAttachment
		SetAutoFileRequester FALSE
	EndScript
	AfterAttachment
		DrawBorder 6,12,113,137,BEVEL ,2,1
		Let WHICH = ARG1
		LoadDocument TheOriginDirectory||"VEXT.txt","FtypeDoc"
		IfError
			SetWindowTitle "load error"
		EndIf
		WorkWithDocument "FtypeDoc"
		PositionOnLine 1
	EndScript
	Window "UserWindow"
		Definition
			Origin 250,25
			Size 125,164
			Title "FileType Menu:"
			NumberOfColors 4
			DefaultColors 0,1,0
			WindowObjects DRAGBAR 
			WindowFlags ACTIVATE TOFRONT 
			VisualEffects NONE ,WAIT 
		EndScript
		OnCloseButton
			Quit
		EndScript
	EndObject
	Memo "Ftype"
		Definition
			Origin 8,13
			Size 110,135
			Font "topaz",8 ; FontName, PointSize
			Style PLAIN ,2,3
			TextColors 1,0,JAM2  ; PenA, PenB, DrawMode
			Border NONE ,2,1 ; BorderStyle, MainPen, ExtraPen
			MemoDocument "FtypeDoc" ; where the text comes from
			ScrollBars RIGHT 
			InputStyle NORMAL 
		EndScript
		OnDoubleClick
			WorkWithDocument "FtypeDoc"
			If TheLine <> ""
				SendToParentDeck "FTYPE",WHICH,THEWORD
			EndIf
		EndScript
	EndObject
	TextButton "SAVE"
		Definition
			Origin 66,150
			Font "topaz",8 ; FontName, PointSize
			Style SHADOW ,1,3
			TextColors 2,0,JAM1  ; PenA, PenB, DrawMode
			Text " SAVE "
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			SaveDocument "FtypeDoc",TheOriginDirectory||"VEXT.txt"
		EndScript
	EndObject
	TextButton "QUIT"
		Definition
			Origin 6,150
			Font "topaz",8 ; FontName, PointSize
			Style SHADOW ,1,3
			TextColors 2,0,JAM1  ; PenA, PenB, DrawMode
			Text " QUIT "
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			Quit
		EndScript
	EndObject
* End of Card "Ftype"
*************

*************
* Card "HELP"
	NoAttach
	BeforeAttachment
		SetAutoFileRequester FALSE
	EndScript
	AfterAttachment
		LoadDocument TheOriginDirectory||"Vortex.doc","HELPdoc"
		IfError
			SetWindowTitle "error.. could not find:"||TheOriginDirectory||"Vortex.doc"
		Else
			PositionOnLine 1
			SearchFor ARG1
			If Searchfound
				MoveCursor DOWN ,6
			EndIf
		EndIf
	EndScript
	Window "UserWindow"
		Definition
			Origin 0,0
			Size 640,125
			Title "                        \\//ortex HELP MODE"
			NumberOfColors 4
			DefaultColors 0,1,0
			WindowObjects CLOSEBUTTON DEPTHBUTTONS DRAGBAR 
			WindowFlags ACTIVATE TOFRONT 
			VisualEffects NONE ,WAIT 
		EndScript
		OnCloseButton
			Quit
		EndScript
	EndObject
	Memo "HELP"
		Definition
			Origin 4,11
			Size 632,111
			Font "topaz",8 ; FontName, PointSize
			Style PLAIN ,2,3
			TextColors 1,0,JAM2  ; PenA, PenB, DrawMode
			Border NONE ,2,1 ; BorderStyle, MainPen, ExtraPen
			MemoDocument "HELPdoc" ; where the text comes from
			ScrollBars RIGHT 
			InputStyle LOCKEDOUT 
		EndScript
	EndObject
* End of Card "HELP"
*************

*************
* Card "INPUT"
	NoAttach
	AfterAttachment
		If ARG1 = "RENAME"
			SetWindowTitle "Rename File....."
			SetText "NAMEfield",ARG2
			Let MODE = "RENAME"
		EndIf
	EndScript
	Window "UserWindow"
		Definition
			Origin 165,82
			Size 310,25
			Title ""
			NumberOfColors 4
			DefaultColors 0,1,0
			WindowObjects CLOSEBUTTON DRAGBAR 
			WindowFlags ACTIVATE TOFRONT 
			VisualEffects NONE ,WAIT 
		EndScript
		OnCloseButton
			Quit
		EndScript
	EndObject
	TextField "NAMEfield"
		Definition
			Origin 9,13
			Size 292,8
			Justification LEFT 
			MaxFieldLength 256
			InitialText ""
			Border DOUBLEBEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
		EndScript
		OnRelease
			Let RNAME = TextFrom("NAMEfield")
			SendToParentDeck MODE,RNAME
			Quit
		EndScript
	EndObject
	RightMouseButton "UserRMB_1"
		OnClick
			SendToParentDeck "SAVE",SNAME
			Quit
		EndScript
	EndObject
* End of Card "INPUT"
*************

*************
* Card "LIST"
	NoAttach
	BeforeAttachment
		SetAutoFileRequester FALSE
	EndScript
	AfterAttachment
		LoadDocument TheOriginDirectory||"Line.txt","LINEdoc"
		IfError
			SetWindowTitle "could not find "||TheOriginDirectory||"Line.txt"
		EndIf
		WorkWithDocument "LINEdoc"
		PositionOnLine 1
	EndScript
	Window "UserWindow"
		Definition
			Origin 80,10
			Size 500,113
			Title "KEYS: DEL=(DELETE LINE) ^D=(DUPE LINE) ^C=(CLEAR)"
			NumberOfColors 4
			DefaultColors 0,1,0
			WindowObjects DRAGBAR 
			WindowFlags ACTIVATE TOFRONT 
			VisualEffects NONE ,WAIT 
		EndScript
	EndObject
	Memo "LINE"
		Definition
			Origin 8,14
			Size 484,82
			Font "topaz",8 ; FontName, PointSize
			Style PLAIN ,2,3
			TextColors 1,0,JAM2  ; PenA, PenB, DrawMode
			Border DOUBLEBEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			MemoDocument "LINEdoc" ; where the text comes from
			ScrollBars RIGHT 
			InputStyle NORMAL 
		EndScript
		OnDoubleClick
			WorkWithDocument "LINEdoc"
			If theline <> ""
				SendToParentDeck "LINE",THELINE
				Quit
			EndIf
		EndScript
	EndObject
	AKey "DELETE"
		Definition
			QualifiersPressed NONE 
			KeyPressed DELETE 
		EndScript
		OnDown
			WorkWithDocument "LINEdoc"
			If TheLIne <> ""
				Delete LINE 
			EndIf
		EndScript
	EndObject
	TextButton "SAVE"
		Definition
			Origin 215,99
			Font "topaz",8 ; FontName, PointSize
			Style SHADOW ,3,3
			TextColors 2,0,JAM1  ; PenA, PenB, DrawMode
			Text " SAVE "
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			WorkWithDocument "LINEdoc"
			PositionOnLine 1
			If TheLine <> ""
				SaveDocument "LINEdoc",TheOriginDirectory||"LINE.txt"
			Else
				SetWindowTitle "Nothing to save! Enter something first!"
			EndIf
		EndScript
	EndObject
	TextButton "ABORT"
		Definition
			Origin 432,99
			Font "topaz",8 ; FontName, PointSize
			Style SHADOW ,3,3
			TextColors 2,0,JAM1  ; PenA, PenB, DrawMode
			Text " ABORT "
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			Quit
		EndScript
	EndObject
	TextButton "ABORT2"
		Definition
			Origin 7,99
			Font "topaz",8 ; FontName, PointSize
			Style SHADOW ,3,3
			TextColors 2,0,JAM1  ; PenA, PenB, DrawMode
			Text " ABORT "
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			Quit
		EndScript
	EndObject
* End of Card "LIST"
*************

*************
* Card "LOG"
	NoAttach
	AfterAttachment
		DrawBorder 6,12,133,19,BEVEL ,2,1
	EndScript
	Window "UserWindow"
		Definition
			Origin 172,74
			Size 145,34
			Title "LOG LOAD/SAVE"
			NumberOfColors 4
			DefaultColors 0,1,0
			WindowObjects CLOSEBUTTON DRAGBAR 
			WindowFlags ACTIVATE TOFRONT 
			VisualEffects NONE ,WAIT 
		EndScript
		OnCloseButton
			Quit
		EndScript
	EndObject
	TextButton "LOAD"
		Definition
			Origin 16,16
			Font "topaz",8 ; FontName, PointSize
			Style SHADOW ,1,3
			TextColors 2,0,JAM1  ; PenA, PenB, DrawMode
			Text " LOAD "
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			GotoCard "REQ","PATH&FILE","","Load a LOG file...","","LOADlog"
		EndScript
	EndObject
	TextButton "SAVE"
		Definition
			Origin 75,16
			Font "topaz",8 ; FontName, PointSize
			Style SHADOW ,1,3
			TextColors 2,0,JAM1  ; PenA, PenB, DrawMode
			Text " SAVE "
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			GotoCard "REQ","PATH&FILE","","SAVE a LOG file...","","SAVElog"
		EndScript
	EndObject
* End of Card "LOG"
*************

*************
* Card "QUIT"
	NoAttach
	AfterAttachment
		DrawBorder 9,12,222,35,BEVEL ,2,1
		SetPrintFont "topaz",8
		SetPrintStyle SHADOW ,1,3
		SetPen 2,0
		SetDrawMode JAM1 
		SetWindowTitle ARG1
		PrintText "You really wanna quit?",33,18
	EndScript
	Window "UserWindow"
		Definition
			Origin 172,74
			Size 240,50
			Title ""
			NumberOfColors 4
			DefaultColors 0,1,0
			WindowObjects DRAGBAR 
			WindowFlags ACTIVATE TOFRONT 
			VisualEffects NONE ,WAIT 
		EndScript
	EndObject
	TextButton "QUIT"
		Definition
			Origin 28,33
			Font "topaz",8 ; FontName, PointSize
			Style SHADOW ,3,3
			TextColors 2,0,JAM1  ; PenA, PenB, DrawMode
			Text " QUIT "
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			SendToParentDeck "QUIT"
			Quit
		EndScript
	EndObject
	TextButton "NO"
		Definition
			Origin 154,33
			Font "topaz",8 ; FontName, PointSize
			Style SHADOW ,3,3
			TextColors 2,0,JAM1  ; PenA, PenB, DrawMode
			Text " D'OH! "
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			Quit
		EndScript
	EndObject
* End of Card "QUIT"
*************

*************
* Card "REQ"
	BeforeAttachment
		SetSystemRequesterTo NOWHERE 
	EndScript
	AfterAttachment
		If ARG1 <> "BATCH"
			DisableObject ("ALL")
		EndIf
		Let SEL = ARG1
		Let REQTEXT = ARG3
		If REQTEXT <> ""
			Let REQTEXT = REQTEXT||"   "
		EndIf
		Let LASTDIR = ARG2
		If LASTDIR = ""
			Let LASTDIR = "ram:"
		EndIf
		If Not Exists(LASTDIR)
			Let LASTDIR = "ram:"
		EndIf
		Let WhichField = ARG4
		Let ACTION = ARG5
		SetCurrentDirectory LASTDIR
		SetSystemRequesterTo WINDOW 
		Do "GD"
	EndScript
	Window "UserWindow"
		Definition
			Origin 110,42
			Size 423,112
			Title "Path/Filename Requester"
			NumberOfColors 4
			DefaultColors 0,1,0
			WindowObjects CLOSEBUTTON DEPTHBUTTONS DRAGBAR 
			WindowFlags ACTIVATE TOFRONT 
			VisualEffects NONE ,WAIT 
		EndScript
		OnCloseButton
			Quit
		EndScript
	EndObject
	List "DISKS"
		Definition
			Origin 10,25
			Size 157,82
			Font "topaz",8 ; FontName, PointSize
			Style PLAIN ,2,3
			TextColors 1,0,JAM2  ; PenA, PenB, DrawMode
			Border EMBOSSED ,2,1 ; BorderStyle, MainPen, ExtraPen
			ListDocument "DISKdoc" ; where the text comes from
		EndScript
		OnClick
			WorkWithDocument "DISKDOC"
			If FindChars(THELINE,":",1)
				SetCurrentDirectory THELINE
				IfError
					SetWindowTitle "Disk Error"
					Delete LINE 
					ExitScript
				EndIf
				SetText "FILE",""
				Do "GD"
				Let DirType = 0
			Else
				SetCurrentDirectory Textfrom("PATH")||THELINE
				IfError
					SetWindowTitle "Directory Error!"
					Delete LINE 
					ExitScript
				EndIf
				SetText "FILE",""
				Do "GD"
				Let DirType = 0
			EndIf
		EndScript
	EndObject
	List "FILES"
		Definition
			Origin 211,25
			Size 202,82
			Font "topaz",8 ; FontName, PointSize
			Style PLAIN ,2,3
			TextColors 1,0,JAM2  ; PenA, PenB, DrawMode
			Border EMBOSSED ,2,1 ; BorderStyle, MainPen, ExtraPen
			ListDocument "FILESdoc" ; where the text comes from
		EndScript
		OnDoubleClick
			WorkWithDocument "FILESDOC"
			SetWordDelimiters ""
			If SEL = "PATH"
				Let FILE = Textfrom("PATH")
			Else
				Let FILE = textfrom("PATH")||TheLine
			EndIf
			Let LASTDIR = textfrom("PATH")
			SendToParentDeck SEL,FILE,LASTDIR,WhichField,ACTION
			If SEL <> "BATCH"
				Quit
				ExitScript
			EndIf
		EndScript
		OnClick
			WorkWithDocument "FILESDOC"
			If TheLine <> ""
				SetText "FILE",THELINE
			EndIf
		EndScript
	EndObject
	TextButton "PARENT"
		Definition
			Origin 171,25
			Font "topaz",8 ; FontName, PointSize
			Style PLAIN ,2,3
			TextColors 3,0,JAM1  ; PenA, PenB, DrawMode
			Text " // "
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			If DirType = 0
				SetText "FILE",""
				Nop;SetCurrentDirectory ParentOf(TheCurrentDirectory)
				SetCurrentDirectory ParentOf(textfrom("PATH"))
				IfError
					SetWindowTitle "Error finding Parent of "||Textfrom("PATH")
					ExitScript
				EndIf
				Do "GD"
			EndIf
		EndScript
	EndObject
	TextButton "DSKS"
		Definition
			Origin 171,37
			Font "topaz",8 ; FontName, PointSize
			Style PLAIN ,2,3
			TextColors 3,0,JAM1  ; PenA, PenB, DrawMode
			Text "DSKS"
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			Let WHICHTYPE = "DISKS"
			Let DIRTYPE = 1
			Do "DISK"
		EndScript
	EndObject
	TextButton "DIRS"
		Definition
			Origin 171,49
			Font "topaz",8 ; FontName, PointSize
			Style PLAIN ,2,3
			TextColors 3,0,JAM1  ; PenA, PenB, DrawMode
			Text "DIRS"
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			If DIRTYPE = 1 OR DIRTYPE = 2
				MakeDocument "DISKDOC"
				SetCurrentDirectory Textfrom("PATH")
				IfError
					SetWindowTitle "Error reading directories on "||textfrom("PATH")
					ExitScript
				EndIf
				InsertDirectoryList DIRECTORIESONLY 
				MoveCursorTo STARTOF DOCUMENT 
				SortDocument
				If LinesInDocument > 1
					Delete LINE 
				EndIf
				Let DirType = 0
			EndIf
		EndScript
	EndObject
	TextButton "ASGN"
		Definition
			Origin 171,61
			Font "topaz",8 ; FontName, PointSize
			Style PLAIN ,2,3
			TextColors 3,0,JAM1  ; PenA, PenB, DrawMode
			Text "ASGN"
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			Let WHICHTYPE = "ASSIGNS"
			Let DIRTYPE = 2
			Do "DISK"
		EndScript
	EndObject
	TextButton "HIDE"
		Definition
			Origin 171,73
			Font "topaz",8 ; FontName, PointSize
			Style PLAIN ,2,3
			TextColors 3,0,JAM1  ; PenA, PenB, DrawMode
			Text "HIDE"
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags BUTTONTOGGLES 
		EndScript
	EndObject
	TextButton "ALL"
		Definition
			Origin 171,85
			Font "topaz",8 ; FontName, PointSize
			Style PLAIN ,2,3
			TextColors 3,0,JAM1  ; PenA, PenB, DrawMode
			Text "ALL>"
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			Let LASTDIR = Thecurrentdirectory
			WorkWithDocument "filesdoc"
			PositionOnLine 1
			Let LINES = Linesindocument
			MakeDocument "alldoc"
			WorkWithDocument "alldoc"
			PositionOnLine 1
			While THELINENUMBER < LINES
				WorkWithDocument "filesdoc"
				Let FILE = THELINE
				WorkWithDocument "alldoc"
				Type LASTDIR||FILE,NEWLINE 
				WorkWithDocument "filesdoc"
				MoveCursor DOWN ,1
			EndLoop
			WorkWithDocument "filesdoc"
			PositionOnLine LINES
			If TheLine <> ""
				Let FILE = THELINE
				WorkWithDocument "alldoc"
				Type LASTDIR||FILE,NEWLINE 
			EndIf
			Let FILE = textfromdocument("alldoc")
			Let SEL = "BATCH-ALL"
			Let lastdir = Thecurrentdirectory
			SendToParentDeck SEL,FILE,LASTDIR
			Nop;Quit
		EndScript
	EndObject
	TextField "PATH"
		Definition
			Origin 10,13
			Size 195,8
			Justification LEFT 
			MaxFieldLength 150
			InitialText ""
			Border DOUBLEBEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
		EndScript
		OnRelease
			Let DESTDIR = TextFrom("PATH")
			Let NUM = NumberofChars(DESTDIR)
			If GetChars(DESTDIR,NUM,1) <> "/"
				If GetChars(DESTDIR,NUM,1) <> ":"
					Let DESTDIR = DESTDIR||"/"
					SetText "PATH",DESTDIR
				EndIf
			EndIf
			If NOT EXISTS(DESTDIR)
				SetWindowTitle DESTDIR || "That PATH Doesn't Exist!!!!"
				ExitScript
			EndIf
			SetCurrentDirectory DESTDIR
			SetText "FILE",""
			Do "GD"
		EndScript
	EndObject
	TextField "FILE"
		Definition
			Origin 214,13
			Size 198,8
			Justification LEFT 
			MaxFieldLength 150
			InitialText ""
			Border DOUBLEBEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
		EndScript
		OnRelease
			If SEL = "BATCH" OR SEL = "BATCH-ALL"
				Quit
				ExitScript
			EndIf
			If SEL = "PATH&FILE" AND textfrom("FILE") = ""
				Quit
				ExitScript
			EndIf
			WorkWithDocument "FILESDOC"
			SetWordDelimiters ""
			If SEL = "PATH"
				Let FILE = Textfrom("PATH")
			Else
				Let FILE = Textfrom("PATH")||textfrom("FILE")
			EndIf
			Let LASTDIR = Textfrom("PATH")
			SendToParentDeck SEL,FILE,LASTDIR,WhichField,ACTION
			Quit
		EndScript
	EndObject
	TextButton "OK"
		Definition
			Origin 171,97
			Font "topaz",8 ; FontName, PointSize
			Style PLAIN ,2,3
			TextColors 3,0,JAM1  ; PenA, PenB, DrawMode
			Text "O.K."
			Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight COMPLEMENT 
			ButtonFlags NONE 
		EndScript
		OnClick
			If SEL = "BATCH" OR SEL = "BATCH-ALL"
				Quit
				ExitScript
			EndIf
			If SEL = "PATH&FILE" AND Textfrom("FILE") = ""
				Quit
				ExitScript
			EndIf
			WorkWithDocument "FILESDOC"
			SetWordDelimiters ""
			If SEL = "PATH"
				Let FILE = Textfrom("PATH")
			Else
				Let FILE = Textfrom("PATH")||textfrom("FILE")
			EndIf
			Let LASTDIR = Textfrom("PATH")
			SendToParentDeck SEL,FILE,LASTDIR,WhichField,ACTION
			Quit
		EndScript
	EndObject
	Disk "UserDiskObject_1"
		OnRemoved
			If DirType = 0
				SetCurrentDirectory "ram:"
				ExitScript
			ElseIf DIRTYPE = 1
				Do "DISK"
			EndIf
		EndScript
		OnInserted
			If DIRTYPE = 1
				Do "DISK"
			EndIf
		EndScript
	EndObject
* End of Card "REQ"
*************

*************
* Card "STATUS"
	NoAttach
	MessageFromParentDeck
		If ARG1 = "QUIT"
			Quit
			ExitScript
		EndIf
		If ARG1 <> ""
			SetText "STAT1",ARG1
		EndIf
		If ARG2 <> ""
			SetText "STAT2",ARG2
		EndIf
	EndScript
	Window "UserWindow"
		Definition
			Origin 0,28
			Size 640,33
			Title "                      \\// O R T E X  STATUS WINDOW"
			NumberOfColors 4
			DefaultColors 0,1,0
			WindowObjects DRAGBAR 
			WindowFlags ACTIVATE TOFRONT 
			VisualEffects NONE ,WAIT 
		EndScript
	EndObject
	TextField "STAT1"
		Definition
			Origin 7,12
			Size 627,8
			Justification LEFT 
			MaxFieldLength 256
			InitialText ""
			Border NONE ,2,1 ; BorderStyle, MainPen, ExtraPen
		EndScript
	EndObject
	TextField "STAT2"
		Definition
			Origin 7,21
			Size 627,8
			Justification LEFT 
			MaxFieldLength 256
			InitialText ""
			Border NONE ,2,1 ; BorderStyle, MainPen, ExtraPen
		EndScript
	EndObject
	AreaButton "Nothing"
		Definition
			Origin 5,11
			Size 630,20
			Border NONE ,2,1 ; BorderStyle, MainPen, ExtraPen
			Highlight NONE 
			ButtonFlags NONE 
		EndScript
	EndObject
* End of Card "STATUS"
*************

*************
* Global routine "DISK"
	SetText "FILE",""
	Nop;SetText "PATH",""
	Nop;WorkWithDocument "FILESDOC"
	Nop;Clear DOCUMENT
	MakeDocument "DISKDOC"
	If WHICHTYPE = "DISKS"
		InsertDeviceList LOGICAL 
	ElseIf WHICHTYPE = "ASSIGNS"
		InsertDeviceList ASSIGNS 
	EndIf
	Nop;Let DirType = NUM
	MoveCursorTo STARTOF DOCUMENT 
	SortDocument
	If LinesInDocument > 1
		Delete LINE 
	EndIf
	Loop
		MoveCursorTo ENDOF LINE 
		Type ":"
		MoveCursor DOWN 
	Until TheLINENUMBER = LINESINDOCUMENT
	MoveCursorTo ENDOF LINE 
	Type ":"
	PositionOnLine 1
* End of routine "DISK"
*************

*************
* Global routine "GD"
	SetText "PATH",TheCurrentDirectory
	Nop;----
	GetDiskInfo TheCurrentDirectory,BlksTotal,BlksUsed,BlkSize
	Let Rem = (BlksTotal-BlksUsed)*BlkSize/1
	SetWindowTitle REQTEXT||Rem||" Free"
	Nop;----
	GetDiskInfo TheCurrentDirectory,BytesPerBlock
	Nop;SetWindowTitle "Free "||BytesPerBlock
	MakeDocument "DISKDOC"
	InsertDirectoryList DIRECTORIESONLY 
	SortDocument
	If LinesInDocument > 1
		Delete LINE 
	EndIf
	MakeDocument "FILESDOC"
	InsertDirectoryList FILESONLY 
	MoveCursorTo STARTOF DOCUMENT 
	WorkWithDocument "FILESDOC"
	If ObjectState("HIDE") = TRUE
		While TheLine <> ""
			If FindChars(TheLine,".info",1)
				Delete LINE 
			Else
				MoveCursor DOWN 
			EndIf
		EndLoop
	EndIf
	SortDocument
	If LinesInDocument > 1
		Delete LINE 
	EndIf
* End of routine "GD"
*************

