Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 274 lines (262 sloc) 9.084 kb
7812daa importing 6.7.1
U-THOMAS\Jason Merrill authored
1 VERSION 5.00
2 Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
3 Begin VB.Form frmOpen
4 BorderStyle = 3 'Fixed Dialog
5 Caption = "Start FFXIP"
6 ClientHeight = 2985
7 ClientLeft = 45
8 ClientTop = 435
9 ClientWidth = 6540
10 Icon = "frmOpen.frx":0000
11 LinkTopic = "Form1"
12 MaxButton = 0 'False
13 MinButton = 0 'False
14 ScaleHeight = 2985
15 ScaleWidth = 6540
16 ShowInTaskbar = 0 'False
17 Begin MSComDlg.CommonDialog CD1
18 Left = 3015
19 Top = 2655
20 _ExtentX = 847
21 _ExtentY = 847
22 _Version = 393216
23 Filter = "Logs (*.txt;*.log)|*.txt;*.log"
24 End
25 Begin VB.Frame Frame2
26 Caption = "Options"
27 BeginProperty Font
28 Name = "MS Sans Serif"
29 Size = 8.25
30 Charset = 0
31 Weight = 700
32 Underline = 0 'False
33 Italic = 0 'False
34 Strikethrough = 0 'False
35 EndProperty
36 Height = 2535
37 Left = 4140
38 TabIndex = 10
39 Top = 45
40 Width = 2355
41 Begin VB.OptionButton optionAction
42 Caption = "Gather log files to date."
43 Height = 195
44 Index = 3
45 Left = 135
46 TabIndex = 5
47 ToolTipText = $"frmOpen.frx":1E72
48 Top = 810
49 Width = 2040
50 End
51 Begin VB.TextBox txtGather
52 BackColor = &H00FFFFFF&
53 Height = 285
54 Left = 90
55 MaxLength = 20
56 TabIndex = 7
57 ToolTipText = "Gathered Logs will be saved to the FFXIP directory."
58 Top = 2115
59 Width = 2130
60 End
61 Begin VB.OptionButton optionAction
62 Caption = "Open saved log file."
63 Height = 195
64 Index = 2
65 Left = 135
66 TabIndex = 6
67 ToolTipText = "Use to open a log file that you have gathered."
68 Top = 1080
69 Width = 1860
70 End
71 Begin VB.OptionButton optionAction
72 Caption = "Parse immediately."
73 Height = 195
74 Index = 0
75 Left = 135
76 TabIndex = 3
77 ToolTipText = "Will immediately parse existing FFXI logs and any new ones that appear."
78 Top = 270
79 Value = -1 'True
80 Width = 1860
81 End
82 Begin VB.OptionButton optionAction
83 Caption = "Gather log files."
84 Height = 195
85 Index = 1
86 Left = 135
87 TabIndex = 4
88 ToolTipText = $"frmOpen.frx":1EFE
89 Top = 540
90 Width = 2130
91 End
92 Begin VB.Label Label2
93 Alignment = 2 'Center
94 Caption = "Hold mouse over options for descriptions."
95 ForeColor = &H00FF0000&
96 Height = 420
97 Left = 270
98 TabIndex = 12
99 Top = 1395
100 Width = 1680
101 End
102 Begin VB.Label Label1
103 Caption = "Save gathered logs as:"
104 Height = 195
105 Left = 90
106 TabIndex = 11
107 Top = 1890
108 Width = 2085
109 End
110 End
111 Begin VB.Frame frameFolder
112 Caption = "Select FFXI Log Folder"
113 BeginProperty Font
114 Name = "MS Sans Serif"
115 Size = 8.25
116 Charset = 0
117 Weight = 700
118 Underline = 0 'False
119 Italic = 0 'False
120 Strikethrough = 0 'False
121 EndProperty
122 Height = 2535
123 Left = 45
124 TabIndex = 9
125 Top = 45
126 Width = 4065
127 Begin VB.DirListBox dirList
128 Height = 1890
129 Left = 90
130 TabIndex = 2
131 Top = 540
132 Width = 3885
133 End
134 Begin VB.DriveListBox drvList
135 Height = 315
136 Left = 90
137 TabIndex = 1
138 Top = 225
139 Width = 3930
140 End
141 End
142 Begin VB.CommandButton cmdCancel
143 Cancel = -1 'True
144 Caption = "&Cancel"
145 Height = 330
146 Left = 5310
147 TabIndex = 8
148 Top = 2610
149 Width = 1185
150 End
151 Begin VB.CommandButton cmdOK
152 Caption = "&OK"
153 Default = -1 'True
154 Height = 330
155 Left = 45
156 TabIndex = 0
157 Top = 2610
158 Width = 1185
159 End
160 End
161 Attribute VB_Name = "frmOpen"
162 Attribute VB_GlobalNameSpace = False
163 Attribute VB_Creatable = False
164 Attribute VB_PredeclaredId = True
165 Attribute VB_Exposed = False
166
167 Option Explicit
168 Private Sub cmdCancel_Click()
169 Unload Me
170 End Sub
171
172 Private Sub cmdOK_Click()
173 Dim FSO As FileSystemObject
174 Set FSO = New FileSystemObject
175 If FSO.FileExists(App.Path & "\error_log.txt") = True Then
176 FSO.DeleteFile App.Path & "\error_log.txt"
177 End If
178 Dim ErrorFile
179 Dim SaveFile
180 Set ErrorFile = FSO.CreateTextFile(App.Path & "\error_log.txt", True)
181 ErrorFile.WriteLine ("FFXI Parser Error Log")
182 ErrorFile.Close
183 Set ErrorFile = Nothing
184
185 frmRead.dirList.Path = dirList.Path
186 SaveSetting App.Title, "Settings", "LogPath", dirList.Path
187 frmRead.listResults.Clear
188 frmRead.mnuClear_Click
189
190 If optionAction(0).Value = True Then
191 OpenSingle = False
192 Gather = False
193 frmRead.StartNew
194 Unload Me
195 ElseIf optionAction(1).Value = True Then
196 If Trim(txtGather.Text) <> "" Then
197 OpenSingle = False
198 Gather = True
199 If FSO.FileExists(App.Path & "\" & txtGather.Text) = True Then
200 FSO.DeleteFile App.Path & "\" & txtGather.Text
201 End If
202 Set SaveFile = FSO.CreateTextFile(App.Path & "\" & txtGather.Text, True)
203 SaveFile.Close
204 Set SaveFile = Nothing
205 SingleFile = App.Path & "\" & txtGather.Text
206 frmRead.StartNew
207 Unload Me
208 Else
209 MsgBox "Please enter a file name.", vbInformation, "Gather"
210 End If
211 ElseIf optionAction(3).Value = True Then
212 OpenSingle = False
213 GatherDate = True
214 Gather = True
215 If FSO.FileExists(App.Path & "\" & Format(Date, "MM-DD-YYYY") & ".log") = True Then
216 FSO.DeleteFile App.Path & "\" & Format(Date, "MM-DD-YYYY") & ".log"
217 End If
218 Set SaveFile = FSO.CreateTextFile(App.Path & "\" & Format(Date, "MM-DD-YYYY") & ".log", True)
219 SaveFile.Close
220 Set SaveFile = Nothing
221 SingleFile = App.Path & "\" & Format(Date, "MM-DD-YYYY") & ".log"
222 frmRead.StartNew
223 Unload Me
224 Else
225 OpenSingle = True
226 Gather = False
227 CD1.InitDir = App.Path
228 CD1.ShowOpen
229 If CD1.FileName <> "" Then
230 Screen.MousePointer = vbHourglass
231 DoEvents
232 SingleFile = CD1.FileName
233 If InStr(1, CD1.FileName, "EditFile.log") = 0 Then
234 frmRead.StartNew
235 Unload Me
236 Else
237 MsgBox "Unable to open '" & SingleFile & "'", vbCritical, "Error"
238 End If
239 Screen.MousePointer = vbDefault
240 End If
241 End If
242 Set FSO = Nothing
243 End Sub
244
245
246 Private Sub drvList_Change()
247 On Error Resume Next
248 dirList.Path = drvList.Drive
249 End Sub
250
251
252 Private Sub Form_Activate()
253 txtGather = Format(Date, "MM-DD-YYYY") & ".log"
254 dirList.Path = frmRead.dirList.Path
255 If GetSetting(App.Title, "Settings", "NewUserA", Default:=True) Then
256 MsgBox "Select the folder where the FFXI log files are located." & vbNewLine & vbNewLine & "Usually: ""C:\Program Files\PlayOnline\SquareEnix\FINAL FANTASY XI\TEMP""", vbInformation, "Folder Select"
257 SaveSetting App.Title, "Settings", "NewUserA", False
258 End If
259 End Sub
260
261 Private Sub txtGather_Validate(Cancel As Boolean)
262 If txtGather.Text = "" Then txtGather.Text = "GatheredLogs.log"
263 If InStr(1, txtGather, ".") <> 0 Then
264 If Right$(txtGather, 4) <> ".txt" And Right$(txtGather, 4) <> ".log" Then
265 MsgBox "Invalid Format." & vbNewLine & vbNewLine & "Example:" & vbNewLine & "GatheredLogs.log", vbInformation, "Gather"
266 Cancel = True
267 End If
268 Else
269 txtGather.Text = Trim(txtGather.Text) & ".log"
270 End If
271 End Sub
272
273
Something went wrong with that request. Please try again.