Yep, I got a "launch notepad|filename|W" to work to bring notepad up with a
filename
So now back to my original problem of figuring out when to bring Notepad up if
there is no associated filename.
I can go totally "low tech" and do this
-- figure out the file extension by locating the period
IF vFileExt IN ('xls','pdf','doc', etc) THEN
LAUNCH .vFileExt
ELSE
-- do the notepad thing
ENDIF
But I was hoping to do something a little more elegant to trap an error message
if a simple "launch" doesn't work
Karen
-----Original Message-----
From: Dennis McGrath <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Wed, Nov 20, 2013 1:25 pm
Subject: [RBASE-L] - Re: Doing a dynamic "launch" - more
This works for me.
Using the dotted variable eliminates problems with spaces in the filespec.
set var vFile = 'C:\this is a test\test.dfm'
zip notepad .vfile
return
Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]
From: [email protected] [mailto:[email protected]] On Behalf Of Karen Tellef
Sent: Wednesday, November 20, 2013 1:08 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Doing a dynamic "launch" - more
Now that I look at this closer, it looks like I can't bring up RBEdit from
within an RBase form anyway the way I have it. If anyone can think of a way to
do what I want, is there a way to launch NotePad or WordPad with a parameter to
send in the file to open?
Karen
-----Original Message-----
From: Karen Tellef <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Wed, Nov 20, 2013 1:02 pm
Subject: [RBASE-L] - Doing a dynamic "launch"
I'd like to put up the file-finder windows box for the user to choose a file
and
then do a Launch.
Problem is, they have alot of files with weird extensions like ".vrw" or ".123"
that are not associated with Windows program but can be brought up in any text
editor. If they pick one of these files and try to launch it you get the
system
message "there is no applicaton associated with the file extension".
I was hoping I could trap this error with an error variable or with SQLCODE <>
0
and then bring up RBEdit, something like the below code, but it doesn't see
this
as an error message. (Note: I want to use launch because there can be Word
or
Excel or PDF files there too)
Any suggestions?
Karen
SET VAR vFilename TEXT = NULL
PLUGINS loadfilenameplus.rbl 'vFilename|fullpath on +
|TITLE Select file to display or type it in +
|VIEW_MODE Details |FILTER All Files (*.*)#*.*
LAUNCH .vFilename
IF SQLCODE <> 0 THEN (or I tried if xError <> 0)
RBEDIT .vFilename
ENDIF