HP3000-L Archives

September 2001, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Joe Silagi <[log in to unmask]>
Reply To:
Joe Silagi <[log in to unmask]>
Date:
Thu, 6 Sep 2001 10:30:46 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (76 lines)
Try something like this..

Sub Main
Dim file_exist
Dim fname As String
Dim result
Dim CR As String * 1

CR = Chr(rcCR)
With Application
   file_exist = True
   fname = .InputBox("Filename to mont", "DSCOPY from PEACE.SHR @CESIUM")
   If fname <> "" Then
      Do
        .Wait 1
        .WaitForHostTrigger
        .Transmit "listf " & fname & CR
         result = .ReadLine    ' read and skip echo'ed LISTF line
         result = .ReadLine
       Loop Until (InStr(1, result, "CIERR") > 0)
      file_exist = False
    End If

End With
End Sub


Joe Silagi
WRQ, Inc


"John Dass" <[log in to unmask]> wrote in message
news:9n7gp702rem@enews2.newsguy.com...
> Hello, I need some help with Reflection Basic programming. I am
> trying to monitor the existence of a file and once the file is
> deleted, a message box pops-up to tell me that the file is deleted.
> Below is the way I code it, but somehow I am unable to read the
> results of my LISTF command to determine if the file is existent
> or not.
>
> Please help me.
>
> Sub Main
>
>    file_exist = true
>    fname = Application.InputBox("Filename to mont","DSCOPY from PEACE.SHR
@
> CESIUM")
>    if fname <> "" then
>       while file_exist
>          application.transmit "listf " & fname & CR
>          msgbox("wait for host trigger")
>          application.waitforhosttrigger
>          msgbox("wait 1 sec")
>          application.wait 1
>          msgbox("read one line")
>          result = application.readline(1)
>          msgbox("after read")
>          ' result returns BLANK !!! why???
>          msgbox(result)
>          if instr(result,"CIERR") > 0 then
>             msgbox("heehee")
>             file_exist = false
>          end if
>       wend
>    end if
>
> End Sub
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2