String manipulation gives Invalid Memory Access run time err
Posted: Tue Sep 12, 2017 11:53 pm
Hello all,
I'm sorry if this has been covered in another topic, I searched but there were a great many hits and it was hard sifting through them all. I'm having a problem with my code. It's a simple program to parse a log file and gather information together in a linked list and then export it to a CSV file. I'm getting an invalid memory access error when I try and populate the linked list structure with a substring. I've attached my code for reference below:
Dim InputParts$(6)
;Set DebugMode to 0 for none, 1 for screen (debug window), 2 for log file
;
#DebugMode = 2
#Q = #DQUOTE$
#QCQ = #DQUOTE$ + "," + #DQUOTE$
Structure FaxInfoStructure
StructureKey.l
MainFolder.s
DirectiveFile.s
FaxFile.s
SenderName.s
SenderCSID.s
RecipientName.s
RecipientCompany.s
RecipientFaxNumber.s
EmailNotification.s
Sent.i
Completed.i
ReturnString.s
ReturnJobID.s
EndStructure
NewList FaxInfo.FaxInfoStructure()
Procedure WriteDebugLine(DebugLine$)
If #DebugMode = 0
Debug DebugLine$
ElseIf #DebugMode = 2
WriteStringN(0, DebugLine$)
EndIf
EndProcedure
Procedure.s GetEnv(Variable$)
CompilerIf #PB_Compiler_OS = #PB_OS_Windows ; On Windows, use the API
Result$ = Space(1000)
If GetEnvironmentVariable_(@Variable$, @Result$, 1000)
ProcedureReturn Result$
Else
ProcedureReturn ""
EndIf
CompilerElse ; On Linux, use the environ array
Protected *Environ.LONG
!extrn _environ
!mov eax, [_environ]
!mov [esp+4], eax
Variable$ + "="
While *Environ\l <> 0
If CompareMemoryString(@Variable$, *Environ\l, 0, Len(Variable$)) = 0
ProcedureReturn PeekS(*Environ\l + Len(Variable$))
EndIf
*Environ + 4
Wend
ProcedureReturn ""
CompilerEndIf
EndProcedure
ReadFileName$ = OpenFileRequester("Select Log file to parse","","*.log;*.txt",0)
If ReadFileName$ = ""
MessageRequester("Exiting...","No file selected, ending program", #PB_MessageRequester_Ok)
End
EndIf
For x = Len(ReadFileName$) To 0 Step -1
If Mid(ReadFileName$,x,1) = "."
SuggestedSaveFile$ = Mid(ReadFileName$,0,x) + "csv"
Break
EndIf
Next x
FileSaveName$ = SaveFileRequester("Enter Output File",SuggestedSaveFile$,"*.csv",0)
If FileSaveName$ = ""
MessageRequester("Exiting...","No save file specified, ending program.", #PB_MessageRequester_Ok)
End
EndIf
If OpenWindow(0, 0, 0, 340, 50, "Parse Logs Progress", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget)
If CreateStatusBar(0, WindowID(0))
AddStatusBarField(120)
AddStatusBarField(170)
EndIf
StatusBarText(0,0,"File Read Progress:")
StatusBarProgress(0, 1, 0)
EndIf
TempLoc$ = GetEnv("TEMP")
LogFile$ = TempLoc$ + "\twco\ParseLogs_" + FormatDate("%yyyy%mm%dd%hh%ii%ss", Date()) + ".log"
If Not OpenFile(0, LogFile$, #PB_File_SharedWrite)
MessageRequester("Unable to open file", "Unable to open the log file for the program " + LogFile$ + ".", #PB_MessageRequester_Ok)
End 1
EndIf
FileTotalSize = FileSize(ReadFileName$)
If Not OpenFile(1, ReadFileName$, #PB_File_SharedRead)
MessageRequester("No File","Unable to open " + ReadFileName$, #PB_MessageRequester_Ok)
End 1
EndIf
ReadProgress = 0
ReadLineNumber = 0
While Eof(1) = 0
For x=1 To 6
InputParts$(x)=""
Next x
Input$ = ReadString(1)
ReadLineNumber = ReadLineNumber + 1
ReadProgress = ReadProgress + StringByteLength(Input$) / 2
ProgressToDisplay = Int((ReadProgress / FileTotalSize) * 100)
WriteDebugLine("Progress status: " + Str(ReadProgress) + " (raw) " + Str(ProgressToDisplay) + " (displayed)")
StatusBarProgress(0, 1, ProgressToDisplay)
Repeat:Until WindowEvent() = 0
WriteDebugLine("Processing Line: '" + Input$ + "'")
PartCount=1
BeenHereBefore=1 ; Set that in case the first character is a space, don't increment pointer
For x = 0 To Len(Input$)
If Mid(Input$,x,1) = " "
If Not BeenHereBefore
If PartCount < 6
PartCount = PartCount + 1
BeenHereBefore = 1
Else
InputParts$(PartCount) = InputParts$(PartCount) + Mid(Input$,x,1)
EndIf
EndIf
Else
InputParts$(PartCount) = InputParts$(PartCount) + Mid(Input$,x,1)
BeenHereBefore = 0
EndIf
Next x
If #DebugMode<>0
WriteDebugLine("Split String Follows:")
For x = 1 To 6
WriteDebugLine(Str(x) + " -- " + InputParts$(x))
Next x
EndIf
;
; Construct the key, which is the 3 digit code after the time followed by the number in slot 4
;
If InputParts$(4) <> #Empty$
FirstKey = Val(StringField(InputParts$(2), 2, ","))
LastKey = Val(InputParts$(4))
CompleteKey$ = Str(FirstKey)
For y = 2 To Len(Str(LastKey)) Step -1
CompleteKey$ = CompleteKey$ + "0"
Next y
Completekey$ = Completekey$ + Str(LastKey)
DebugLine$ = "Complete Key = " + CompleteKey$ + ", first part: " + FirstKey + ", second part: " + LastKey
WriteDebugLine(DebugLine$)
EndIf
KeyNumber=Val(CompleteKey$)
;
; Check if this key already exists. If it does, update it, if not, then create it
;
*Pointer = #Null
ResetList(FaxInfo())
If FirstElement(FaxInfo()) = 0
AddElement(FaxInfo())
*Pointer = @FaxInfo()
FaxInfo()\StructureKey = KeyNumber
Else
While NextElement(FaxInfo())
If FaxInfo()\StructureKey = KeyNumber
*Pointer = @FaxInfo()
EndIf
Wend
If Not *Pointer
AddElement(FaxInfo())
*Pointer = @FaxInfo
FaxInfo()\StructureKey = KeyNumber
EndIf
EndIf
;
; Now, add the appropriate fields
;
ResetList(FaxInfo())
ChangeCurrentElement(FaxInfo(), *Pointer)
If FindString(InputParts$(6),"main folder")
FaxInfo()\MainFolder = Mid(InputParts$(6), FindString(InputParts$(6), "main folder") + 12)
WriteDebugLine("Found main folder: '" + FaxInfo()\MainFolder + "'")
ElseIf FindString(InputParts$(6), "found control file")
FaxInfo()\DirectiveFile = Mid(InputParts$(6), FindString(InputParts$(6), "found control file") + 23)
WriteDebugLine("Found directive file: '" + FaxInfo()\DirectiveFile + "'")
ElseIf FindString(InputParts$(6), "Adding filename")
FaxInfo()\FaxFile = Mid(InputParts$(6), FindString(Inputparts$(6), "Adding filename") + 17)
WriteDebugLine("Found Fax file (or one of them): '" + FaxInfo()\FaxFile + "'")
ElseIf FindString(InputParts$(6), "SenderName")
FaxInfo()\SenderName = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found Sender Name: '" + FaxInfo()\SenderName + "'")
ElseIf FindString(InputParts$(6), "SenderCSID")
FaxInfo()\SenderCSID = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found Sender CSID: '" + FaxInfo()\SenderCSID)
ElseIf FindString(InputParts$(6), "RecipientName")
FaxInfo()\RecipientName = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found Recipient Name: '" + FaxInfo()\RecipientName + "'")
ElseIf FindString(InputParts$(6), "FaxNumber")
FaxInfo()\RecipientFaxNumber = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found Recipient Fax Number '" + FaxInfo()\RecipientFaxNumber + "'")
ElseIf FindString(InputParts$(6), "RecipientCompany")
FaxInfo()\RecipientCompany = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found Recipient Company: '" + FaxInfo()\RecipientCompany + "'")
ElseIf FindString(InputParts$(6), "EmailNotificationAddress")
FaxInfo()\EmailNotification = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found E-mail notification address: '" + FaxInfo()\EmailNotification + "'")
ElseIf FindString(InputParts$(6), "Returned JobId")
FaxInfo()\ReturnJobID = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found the Returned Job ID: '" + FaxInfo()\ReturnJobID)
ElseIf FindString(InputParts$(6), "Return String")
DebugLine$ = InputParts$(6) + "---" + Str(FindString(InputParts$(6),"Return String")) + "_>_>_>" + Str(ReadLineNumber) + " String Length: (" + Str(Len(InputParts$(6))) + ")"
Debug DebugLine$
Debug Mid(InputParts$(6), FindString(InputParts$(6), "Return String") + 16)
FaxInfo()\ReturnString = Mid(InputParts$(6), FindString(InputParts$(6), "Return String") + 16)
WriteDebugLine("Found Reurned String: '" + FaxInfo()\ReturnString + "'")
If FindString(InputParts$(6),"Successfully")
FaxInfo()\Sent = 1
WriteDebugLine("Fax was successfully sent!")
EndIf
EndIf
Wend
CloseFile(1)
OpenFile(2,FileSaveName$)
WriteStringN(2,#Q + "Concord Process #" + #QCQ + "Main Folder" + #QCQ + "Directive File Name" + #QCQ + "Fax File Name" + #QCQ + "Sender Name" + #QCQ + "Sender CSID" + #QCQ + "Recipient Name" + #QCQ + "Recipient Company" + #QCQ + "Recipient Fax Number" + #QCQ + "E-mail Notification address" + #QCQ + "Sent?" + #QCQ + "Completed?" + #QCQ + "Return String from Concord" + #QCQ + "Concord Job ID" + #Q)
ForEach FaxInfo()
*Pointer = @FaxInfo
WriteDebugLine("--------------------------------------")
WriteDebugLine(Str(*Pointer))
WriteDebugLine(" Structure Key: " + FaxInfo()\StructureKey)
WriteDebugLine(" Main Folder: " + FaxInfo()\MainFolder)
WriteDebugLine(" Directive File: " + FaxInfo()\DirectiveFile)
WriteDebugLine(" Fax file: " + FaxInfo()\FaxFile)
WriteDebugLine(" Sender Name: " + FaxInfo()\SenderName)
WriteDebugLine(" Sender CSID: " + FaxInfo()\SenderCSID)
WriteDebugLine(" RecipientName: " + FaxInfo()\RecipientName)
WriteDebugLine(" RecipientCompany:" + FaxInfo()\RecipientCompany)
WriteDebugLine(" Recipient Fax: " + FaxInfo()\RecipientFaxNumber)
WriteDebugLine(" Email Notify: " + FaxInfo()\EmailNotification)
WriteDebugLine(" Sent? " + FaxInfo()\Sent)
WriteDebugLine(" Completed? " + FaxInfo()\Completed)
WriteDebugLine(" Return String: " + FaxInfo()\ReturnString)
WriteDebugLine(" Return Job ID: " + FaxInfo()\ReturnJobID)
WriteString(2,#Q + FaxInfo()\StructureKey + #QCQ + FaxInfo()\MainFolder + #QCQ + FaxInfo()\DirectiveFile + #QCQ + FaxInfo()\FaxFile + #QCQ + FaxInfo()\SenderName + #QCQ + FaxInfo()\SenderCSID + #QCQ + FaxInfo()\RecipientName + #QCQ + FaxInfo()\RecipientCompany + #QCQ + FaxInfo()\RecipientFaxNumber + #QCQ + FaxInfo()\EmailNotification + #QCQ)
If FaxInfo()\Sent
WriteString(2,"Yes" + #QCQ)
Else
WriteString(2,"No" + #QCQ)
EndIf
If FaxInfo()\Completed
WriteString(2,"Yes" + #QCQ)
Else
WriteString(2,"No" + #QCQ)
EndIf
WriteStringN(2,FaxInfo()\ReturnString + #QCQ + FaxInfo()\ReturnJobID + #Q)
Next
The error occurs on the highlighted line. If anyone can point me in the right direction that would be great.
Thanks so much,
steving
I'm sorry if this has been covered in another topic, I searched but there were a great many hits and it was hard sifting through them all. I'm having a problem with my code. It's a simple program to parse a log file and gather information together in a linked list and then export it to a CSV file. I'm getting an invalid memory access error when I try and populate the linked list structure with a substring. I've attached my code for reference below:
Dim InputParts$(6)
;Set DebugMode to 0 for none, 1 for screen (debug window), 2 for log file
;
#DebugMode = 2
#Q = #DQUOTE$
#QCQ = #DQUOTE$ + "," + #DQUOTE$
Structure FaxInfoStructure
StructureKey.l
MainFolder.s
DirectiveFile.s
FaxFile.s
SenderName.s
SenderCSID.s
RecipientName.s
RecipientCompany.s
RecipientFaxNumber.s
EmailNotification.s
Sent.i
Completed.i
ReturnString.s
ReturnJobID.s
EndStructure
NewList FaxInfo.FaxInfoStructure()
Procedure WriteDebugLine(DebugLine$)
If #DebugMode = 0
Debug DebugLine$
ElseIf #DebugMode = 2
WriteStringN(0, DebugLine$)
EndIf
EndProcedure
Procedure.s GetEnv(Variable$)
CompilerIf #PB_Compiler_OS = #PB_OS_Windows ; On Windows, use the API
Result$ = Space(1000)
If GetEnvironmentVariable_(@Variable$, @Result$, 1000)
ProcedureReturn Result$
Else
ProcedureReturn ""
EndIf
CompilerElse ; On Linux, use the environ array
Protected *Environ.LONG
!extrn _environ
!mov eax, [_environ]
!mov [esp+4], eax
Variable$ + "="
While *Environ\l <> 0
If CompareMemoryString(@Variable$, *Environ\l, 0, Len(Variable$)) = 0
ProcedureReturn PeekS(*Environ\l + Len(Variable$))
EndIf
*Environ + 4
Wend
ProcedureReturn ""
CompilerEndIf
EndProcedure
ReadFileName$ = OpenFileRequester("Select Log file to parse","","*.log;*.txt",0)
If ReadFileName$ = ""
MessageRequester("Exiting...","No file selected, ending program", #PB_MessageRequester_Ok)
End
EndIf
For x = Len(ReadFileName$) To 0 Step -1
If Mid(ReadFileName$,x,1) = "."
SuggestedSaveFile$ = Mid(ReadFileName$,0,x) + "csv"
Break
EndIf
Next x
FileSaveName$ = SaveFileRequester("Enter Output File",SuggestedSaveFile$,"*.csv",0)
If FileSaveName$ = ""
MessageRequester("Exiting...","No save file specified, ending program.", #PB_MessageRequester_Ok)
End
EndIf
If OpenWindow(0, 0, 0, 340, 50, "Parse Logs Progress", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget)
If CreateStatusBar(0, WindowID(0))
AddStatusBarField(120)
AddStatusBarField(170)
EndIf
StatusBarText(0,0,"File Read Progress:")
StatusBarProgress(0, 1, 0)
EndIf
TempLoc$ = GetEnv("TEMP")
LogFile$ = TempLoc$ + "\twco\ParseLogs_" + FormatDate("%yyyy%mm%dd%hh%ii%ss", Date()) + ".log"
If Not OpenFile(0, LogFile$, #PB_File_SharedWrite)
MessageRequester("Unable to open file", "Unable to open the log file for the program " + LogFile$ + ".", #PB_MessageRequester_Ok)
End 1
EndIf
FileTotalSize = FileSize(ReadFileName$)
If Not OpenFile(1, ReadFileName$, #PB_File_SharedRead)
MessageRequester("No File","Unable to open " + ReadFileName$, #PB_MessageRequester_Ok)
End 1
EndIf
ReadProgress = 0
ReadLineNumber = 0
While Eof(1) = 0
For x=1 To 6
InputParts$(x)=""
Next x
Input$ = ReadString(1)
ReadLineNumber = ReadLineNumber + 1
ReadProgress = ReadProgress + StringByteLength(Input$) / 2
ProgressToDisplay = Int((ReadProgress / FileTotalSize) * 100)
WriteDebugLine("Progress status: " + Str(ReadProgress) + " (raw) " + Str(ProgressToDisplay) + " (displayed)")
StatusBarProgress(0, 1, ProgressToDisplay)
Repeat:Until WindowEvent() = 0
WriteDebugLine("Processing Line: '" + Input$ + "'")
PartCount=1
BeenHereBefore=1 ; Set that in case the first character is a space, don't increment pointer
For x = 0 To Len(Input$)
If Mid(Input$,x,1) = " "
If Not BeenHereBefore
If PartCount < 6
PartCount = PartCount + 1
BeenHereBefore = 1
Else
InputParts$(PartCount) = InputParts$(PartCount) + Mid(Input$,x,1)
EndIf
EndIf
Else
InputParts$(PartCount) = InputParts$(PartCount) + Mid(Input$,x,1)
BeenHereBefore = 0
EndIf
Next x
If #DebugMode<>0
WriteDebugLine("Split String Follows:")
For x = 1 To 6
WriteDebugLine(Str(x) + " -- " + InputParts$(x))
Next x
EndIf
;
; Construct the key, which is the 3 digit code after the time followed by the number in slot 4
;
If InputParts$(4) <> #Empty$
FirstKey = Val(StringField(InputParts$(2), 2, ","))
LastKey = Val(InputParts$(4))
CompleteKey$ = Str(FirstKey)
For y = 2 To Len(Str(LastKey)) Step -1
CompleteKey$ = CompleteKey$ + "0"
Next y
Completekey$ = Completekey$ + Str(LastKey)
DebugLine$ = "Complete Key = " + CompleteKey$ + ", first part: " + FirstKey + ", second part: " + LastKey
WriteDebugLine(DebugLine$)
EndIf
KeyNumber=Val(CompleteKey$)
;
; Check if this key already exists. If it does, update it, if not, then create it
;
*Pointer = #Null
ResetList(FaxInfo())
If FirstElement(FaxInfo()) = 0
AddElement(FaxInfo())
*Pointer = @FaxInfo()
FaxInfo()\StructureKey = KeyNumber
Else
While NextElement(FaxInfo())
If FaxInfo()\StructureKey = KeyNumber
*Pointer = @FaxInfo()
EndIf
Wend
If Not *Pointer
AddElement(FaxInfo())
*Pointer = @FaxInfo
FaxInfo()\StructureKey = KeyNumber
EndIf
EndIf
;
; Now, add the appropriate fields
;
ResetList(FaxInfo())
ChangeCurrentElement(FaxInfo(), *Pointer)
If FindString(InputParts$(6),"main folder")
FaxInfo()\MainFolder = Mid(InputParts$(6), FindString(InputParts$(6), "main folder") + 12)
WriteDebugLine("Found main folder: '" + FaxInfo()\MainFolder + "'")
ElseIf FindString(InputParts$(6), "found control file")
FaxInfo()\DirectiveFile = Mid(InputParts$(6), FindString(InputParts$(6), "found control file") + 23)
WriteDebugLine("Found directive file: '" + FaxInfo()\DirectiveFile + "'")
ElseIf FindString(InputParts$(6), "Adding filename")
FaxInfo()\FaxFile = Mid(InputParts$(6), FindString(Inputparts$(6), "Adding filename") + 17)
WriteDebugLine("Found Fax file (or one of them): '" + FaxInfo()\FaxFile + "'")
ElseIf FindString(InputParts$(6), "SenderName")
FaxInfo()\SenderName = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found Sender Name: '" + FaxInfo()\SenderName + "'")
ElseIf FindString(InputParts$(6), "SenderCSID")
FaxInfo()\SenderCSID = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found Sender CSID: '" + FaxInfo()\SenderCSID)
ElseIf FindString(InputParts$(6), "RecipientName")
FaxInfo()\RecipientName = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found Recipient Name: '" + FaxInfo()\RecipientName + "'")
ElseIf FindString(InputParts$(6), "FaxNumber")
FaxInfo()\RecipientFaxNumber = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found Recipient Fax Number '" + FaxInfo()\RecipientFaxNumber + "'")
ElseIf FindString(InputParts$(6), "RecipientCompany")
FaxInfo()\RecipientCompany = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found Recipient Company: '" + FaxInfo()\RecipientCompany + "'")
ElseIf FindString(InputParts$(6), "EmailNotificationAddress")
FaxInfo()\EmailNotification = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found E-mail notification address: '" + FaxInfo()\EmailNotification + "'")
ElseIf FindString(InputParts$(6), "Returned JobId")
FaxInfo()\ReturnJobID = Mid(InputParts$(6), FindString(InputParts$(6), ":") + 2)
WriteDebugLine("Found the Returned Job ID: '" + FaxInfo()\ReturnJobID)
ElseIf FindString(InputParts$(6), "Return String")
DebugLine$ = InputParts$(6) + "---" + Str(FindString(InputParts$(6),"Return String")) + "_>_>_>" + Str(ReadLineNumber) + " String Length: (" + Str(Len(InputParts$(6))) + ")"
Debug DebugLine$
Debug Mid(InputParts$(6), FindString(InputParts$(6), "Return String") + 16)
FaxInfo()\ReturnString = Mid(InputParts$(6), FindString(InputParts$(6), "Return String") + 16)
WriteDebugLine("Found Reurned String: '" + FaxInfo()\ReturnString + "'")
If FindString(InputParts$(6),"Successfully")
FaxInfo()\Sent = 1
WriteDebugLine("Fax was successfully sent!")
EndIf
EndIf
Wend
CloseFile(1)
OpenFile(2,FileSaveName$)
WriteStringN(2,#Q + "Concord Process #" + #QCQ + "Main Folder" + #QCQ + "Directive File Name" + #QCQ + "Fax File Name" + #QCQ + "Sender Name" + #QCQ + "Sender CSID" + #QCQ + "Recipient Name" + #QCQ + "Recipient Company" + #QCQ + "Recipient Fax Number" + #QCQ + "E-mail Notification address" + #QCQ + "Sent?" + #QCQ + "Completed?" + #QCQ + "Return String from Concord" + #QCQ + "Concord Job ID" + #Q)
ForEach FaxInfo()
*Pointer = @FaxInfo
WriteDebugLine("--------------------------------------")
WriteDebugLine(Str(*Pointer))
WriteDebugLine(" Structure Key: " + FaxInfo()\StructureKey)
WriteDebugLine(" Main Folder: " + FaxInfo()\MainFolder)
WriteDebugLine(" Directive File: " + FaxInfo()\DirectiveFile)
WriteDebugLine(" Fax file: " + FaxInfo()\FaxFile)
WriteDebugLine(" Sender Name: " + FaxInfo()\SenderName)
WriteDebugLine(" Sender CSID: " + FaxInfo()\SenderCSID)
WriteDebugLine(" RecipientName: " + FaxInfo()\RecipientName)
WriteDebugLine(" RecipientCompany:" + FaxInfo()\RecipientCompany)
WriteDebugLine(" Recipient Fax: " + FaxInfo()\RecipientFaxNumber)
WriteDebugLine(" Email Notify: " + FaxInfo()\EmailNotification)
WriteDebugLine(" Sent? " + FaxInfo()\Sent)
WriteDebugLine(" Completed? " + FaxInfo()\Completed)
WriteDebugLine(" Return String: " + FaxInfo()\ReturnString)
WriteDebugLine(" Return Job ID: " + FaxInfo()\ReturnJobID)
WriteString(2,#Q + FaxInfo()\StructureKey + #QCQ + FaxInfo()\MainFolder + #QCQ + FaxInfo()\DirectiveFile + #QCQ + FaxInfo()\FaxFile + #QCQ + FaxInfo()\SenderName + #QCQ + FaxInfo()\SenderCSID + #QCQ + FaxInfo()\RecipientName + #QCQ + FaxInfo()\RecipientCompany + #QCQ + FaxInfo()\RecipientFaxNumber + #QCQ + FaxInfo()\EmailNotification + #QCQ)
If FaxInfo()\Sent
WriteString(2,"Yes" + #QCQ)
Else
WriteString(2,"No" + #QCQ)
EndIf
If FaxInfo()\Completed
WriteString(2,"Yes" + #QCQ)
Else
WriteString(2,"No" + #QCQ)
EndIf
WriteStringN(2,FaxInfo()\ReturnString + #QCQ + FaxInfo()\ReturnJobID + #Q)
Next
The error occurs on the highlighted line. If anyone can point me in the right direction that would be great.
Thanks so much,
steving