At 10:16 AM -0600 3/31/05, Ben Scofield wrote:
Hey all! Thanks for the quick responses. Those were all somewhat
what I was looking for, BUT, I forgot to mention that I found plenty
of examples for opening a file when it was selected from a dialogue
box. What I need to do is loop through a given folder (path
specified as a windows system variable) and open the files in that
path. There won't be a dialogue box to work with.
That doesn't matter. We've already given you examples where no
dialog box was involved (e.g. PreferencesFolder.Child("foo") or
GetFolderItem("bar")).
Looping through a folder's items looks like this:
Dim i As Integer
Dim f As FolderItem
for i = 1 to myFolder.Count
f = myFolder.Item(i)
DoSomethingWith f
next
where DoSomethingWith is a subroutine that takes a FolderItem.
So in short, how about an example of reading a file line by line
that there has been no user interaction to open, all I have is a
path?
Reading it line by line is doing something with it -- that's entirely
independent of where the FolderItem came from, so the examples in the
language reference (under TextInputStream) should work just fine.
And note that you do NOT start with a path. Paths are evil. Work
entirely with FolderItems.
Best,
- Joe
--
,------------------------------------------------------------------.
| Joseph J. Strout REAL Software, Inc. |
| joe at realsoftware dot com http://www.realsoftware.com |
`------------------------------------------------------------------'
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|