I know how to have an RB program launch another program. For example,
if I have my RB program in the same folder as Notepad, I can do it like
that:
Dim F As FolderItem
F = App.ExecutableFile.Parent.Child ("Notepad.exe")
If F <> Nil and F.Exists Then
F.Launch
End If
BUT what I don't remember how to do in REALbasic (and can't even
remember if I ever knew how to do it in RB) is this: Have a REALbasic
program launch Notepad with a particular file loaded in NotePad (such as
"goodnews.txt")
When DOS was still around, you could do this by putting something like
this in a .bat file:
notepad.exe "goodnews.txt"
That is, you could pass along the parameter by putting it right on the
command line.
Visual Basic was less friendly. In Visual Basic, you could either use
"Shell" to open a particular application like Notepad, but with no
specific document loaded. Or you could use the "ShellExecute" API call
to load in a specific document _using the application associated with
that particular type of document_. But neither serves the purpose. I
want to be able to designate both the application _and_ the specific
document to be loaded in.
Is there a way to do this in REALbasic?
Thanks in advance for any advice.
Barry Traver
_______________________________________________
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>
|