VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsScriptGlobals"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Public Event GetName(ByRef astrName As String)
Public Event GetOutput(ByRef astrText As String)
Public Event SetOutput(ByVal astrText As String)

Public Property Let Output(ByVal astrNew As String)
    RaiseEvent SetOutput(astrNew)
End Property
Public Property Get Output() As String
    RaiseEvent GetOutput(Output)
End Property


Public Sub Alert(Text As String)
    Dim lstrTitle As String
    
    lstrTitle = App.Title
    RaiseEvent GetName(lstrTitle)

    AppActivate frmMain.Caption
    MsgBox Text, vbExclamation, lstrTitle
End Sub

Public Sub WriteLine(Text As String)
    WriteText (Text & vbCrLf)
End Sub

Public Sub WriteText(Text As String)
    Me.Output = Me.Output & Text
End Sub

Public Property Get File() As Object
    Dim lobjFSO As Object
    
    Set lobjFSO = CreateObject("Scripting.FileSystemObject")
    If lobjFSO.FolderExists(frmMain.ZBar.NewFilename) Then
        Set File = lobjFSO.GetFolder(frmMain.ZBar.NewFilename)
    Else
        Set File = lobjFSO.GetFile(frmMain.ZBar.NewFilename)
    End If
End Property

Public Property Get OtherFile() As Object
    Dim lobjFSO As Object
    
    Set lobjFSO = CreateObject("Scripting.FileSystemObject")
    If lobjFSO.FolderExists(frmMain.ZBar.OtherFilename) Then
        Set OtherFile = lobjFSO.GetFolder(frmMain.ZBar.OtherFilename)
    ElseIf lobjFSO.FileExists(frmMain.ZBar.OtherFilename) Then
        Set OtherFile = lobjFSO.GetFile(frmMain.ZBar.OtherFilename)
    End If
End Property
