I have code to read thru the file and display the last line in a message>, but I want it to do the check for me and if problem then notify me..

Thanks a lot.. Ed
Moderators: JRL, Dorian (MJT support)
I have code to read thru the file and display the last line in a message>, but I want it to do the check for me and if problem then notify me..
//Using Input> to test. Normally reading Str from a variable
Input>Str,Enter a line to check
Length>%Str%,Last
Sub>Last,1
MidStr>%Str%,%Last%,1,Last1
If>%Last1%=",DoThis,DoSomethingElse
Label>DoThis
MessageModal>Last character is a "
Goto>End
Label>DoSomethingElse
MessageModal>Last character is not a ", It is %Last1%.
Label>End
Notes://This routine is to count all lines in a file.
//It uses FIND command with output redirected to a temporary file
//It uses /c and /v switches to count lines with a non-existent string.
//User is prompted for full path and filename of file to have lines counted.
//Default value for non-existent string is "qqqxxx", which can be changed.
Label>UserVariables
//Source is the file path\name to have the lines counted
Input>Source,Enter FULL Path and Filename to be counted%CRLF%Format is X:\Path\Filename.ext
//Seek is set to a non-existent string
Input>Seek,Accept default or change the unique value.%CRLF% Wanted is a value that will NOT be in the file,qqqxxx
Label>MacroVariables
Let>RP_WAIT=1
Let>RP_WINDOWMODE=0
/CountFile is the file name to hold the results of the line count
Let>CountFile=%TEMP_DIR%lines.txt
//Line count value is at position equal to length of Full Source path and file name, plus fourteen.
Len>%Source%,FileNameLength
Let>Position=%FileNameLength%+14
Label>Start
//Remove old file that might exist
DeleteFile>%CountFile%
Run Program>command.com /c find /c /v "%Seek%" %Source%>>%CountFile%
Label>DisplayCount
//Results of Find are on the second line
ReadLn>%CountFile%,2,Result
MidStr>%Result%,%Position%,5,Result2
MessageModal>There are %Result2% lines in this file
Label>End