#!/boot/home/config/bin/yab

doc Place a description of your
doc program here.
doc
doc Author, date, license

OpenWindow()

// Main Message Loop
dim msg$(1)
while(not leavingLoop)
	nCommands = token(message$, msg$(), "|")

	for everyCommand = 1 to nCommands
		if(DEBUG and msg$(everyCommand)<>"") print msg$(everyCommand)

		switch(msg$(everyCommand))
			case "_QuitRequested":
			case "MainWindow:_QuitRequested":
				leavingLoop = true
				break
			default:
				break
		end switch

	next everyCommand

wend

CloseWindow()

end


// Setup the main window here
sub OpenWindow()
	window open 100,100 to 600,500, "MainWindow", "Main Window"
	fileload$="/boot/home/Projekte/ApacheGUI/Apache_2.0_Gui_eng.bnd"
	
	//zeile$=system$("grep -C /boot/home/config/bin/yab /boot/home/Projekte/ApacheGUI/Apache_2.0_Gui_eng.bnd")   
	//print zeile$ 
auslesen=open(fileload$, "r")
//while (not EOF(auslesen))
    // x=x+1
    // dim d$(x)
    // line input #auslesen b$
  //   d$(x)=b$
//wend
//close(auslesen)
while (not EOF(auslesen))
	line input #auslesen b$
	dim elements$(1)
	numElements = split(b$, elements$(),"/boot/home/config/bin/yab")
	for i = 1 to numElements
			x=x+1
			dim d$(x)
			d$(x) = elements$(i)
	next i
	wend
	close(auslesen)
	print d$(1)
//draw text 5, 38, "Eintrag 1: "+d$(1), "Main Window"
//draw text 5, 58, "Eintrag 2: "+d$(2), "Main Window"
//draw text 5, 78, "Eintrag 3: "+d$(3), "Main Window"
	return
end sub

// Close down the main window
sub CloseWindow()
	window close "MainWindow"
	return
end sub