
Button 1 Text EditSequence
Button 2 Text SelectSequence

Button 4 Text GetFileNames
Button 5 Text GetFolderNames
Button 6 Text GetTextFile

Button 8 Text ApplicationPath
Button 9 Text FilePath
Button 10 Text FileName

Variable String SequenceName
SequenceName = "TestSeq.seq"
Gosub ShowSequenceName

Controls OpenTextBox
Controls ClearTextBox

Stop																'


' =====================================================================
'  SEQUENCES
' =====================================================================
Label InitSequencePaths
	Variable String EditorFolder
	Variable String EditorApp
	Variable String SequencePathAndName
	'
	EditorFolder = ".\Theremino_HAL\Theremino_Editor\"
	'
	EditorApp = EditorFolder + "Theremino_Editor.exe"
	'
	SequencePathAndName = EditorFolder + "Sequences\" + SequenceName
Return

Label EditSequence
	Gosub InitSequencePaths
	If FileExists(SequencePathAndName)
		Load EditorApp + " " + SequencePathAndName
	EndIf
Return

Label SelectSequence
	Gosub InitSequencePaths
	s1 = SelectFile(EditorFolder + "Sequences\")
	If s1 <> ""
		SequenceName = s1
		Gosub ShowSequenceName
	EndIf
Return

Label ShowSequenceName
	Button SelectSequence Text "Sequence" + CRLF + SequenceName
Return



' =====================================================================
'  GetFileNames  GetFolderNames  GetTextFile
' =====================================================================
Label GetFileNames
	Gosub InitSequencePaths
	s1 = GetFileNames(EditorFolder + "Sequences\")
	Print s1 + CRLF
Return

Label GetFolderNames
	Gosub InitSequencePaths
	s1 = GetFolderNames(EditorFolder)
	Print s1 + CRLF
Return

Label GetTextFile
	Gosub InitSequencePaths
	s1 = GetTextFile(SequencePathAndName)
	Print s1 + CRLF
Return


' =====================================================================
'  GetApplicationPath   GetFilePath   GetFileNameWithoutPath
' =====================================================================
Label ApplicationPath
	s1 = GetApplicationPath()
	Print s1 + CRLF
Return

Label FilePath
	Gosub InitSequencePaths
	s1 = GetFilePath(SequencePathAndName)
	Print s1 + CRLF
Return

Label FileName
	Gosub InitSequencePaths
	s1 = GetFileNameWithoutPath(SequencePathAndName)
	Print s1 + CRLF
Return


'EXEC Sin2 = Sin(33)
