Passing parameters to external programs

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
Mike Dimmick
Posts: 28
Joined: Tue Feb 17, 2004 7:42 am
Location: UK
Contact:

Passing parameters to external programs

Post by Mike Dimmick » Wed Sep 22, 2004 9:13 am

I use TextPad as my default editor for the View and Edit options. At present I use the command line C:\Program Files\TextPad 4\TextPad.exe, but this opens a new frame every time. I'd rather reuse the existing frame. This requires DDE.

TextPad comes with a program to open a file using DDE but it requires a command line parameter in addition to the name of the file. Trying to do this in Vault 2.0.6 doesn't work, e.g. C:\Program Files\TextPad 4\System\Ddeopn32.exe TextPad produces a message box reporting The system cannot find the file specified.

Is there a way to specify command line parameters for a viewer/editor, or should I resort to writing a stub program?

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Wed Sep 22, 2004 10:26 am

Sorry - there isn't a way to do this currently. I'll add it as a feature request.

mscheuner
Posts: 16
Joined: Tue Nov 21, 2006 4:55 am
Location: Berne, Switzerland
Contact:

Re: Passing parameters to external programs

Post by mscheuner » Fri Feb 13, 2009 3:53 am

Has this feature been added in the mean time??

I'd love to specify textpad.exe as my external editor *and* viewer. I can launch textpad.exe with a "-r" command line parameter to put it into read-only mode - but I also need to specify the file name, somehow.

I tried specifying "textpad.exe -r %1" or "textpad.exe -r %file" in Vault - no such luck, still doesn't work.....

I'm using Vault 4.1.4 BTW.

If this feature is STILL on the requested features list - I'll add my vote to it!

Cheers
Marc

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Passing parameters to external programs

Post by Beth » Fri Feb 13, 2009 5:04 pm

I'll need to do some digging around for information on this, but in the meantime, an easy way to make TextPad be the default viewer and editor is to associate the .txt extension with that program. That's a setting in the Windows folder options under file types.
Beth Kieler
SourceGear Technical Support

mscheuner
Posts: 16
Joined: Tue Nov 21, 2006 4:55 am
Location: Berne, Switzerland
Contact:

Re: Passing parameters to external programs

Post by mscheuner » Sat Feb 14, 2009 3:35 am

Beth wrote:I'll need to do some digging around for information on this, but in the meantime, an easy way to make TextPad be the default viewer and editor is to associate the .txt extension with that program. That's a setting in the Windows folder options under file types.
I have that already, not a problem. What I'd really like to accomplish is passing the "-r" (read-only) parameter to Textpad in order to prevent myself from inadvertently editing a file I'm only viewing.

Marc

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Passing parameters to external programs

Post by Beth » Mon Feb 16, 2009 10:59 am

How do you open the file? If you are using the View command, then there is a setting in Vault that can make all files on disk be read only unless a user specifically checks the file out for editing.
Beth Kieler
SourceGear Technical Support

mscheuner
Posts: 16
Joined: Tue Nov 21, 2006 4:55 am
Location: Berne, Switzerland
Contact:

Re: Passing parameters to external programs

Post by mscheuner » Mon Feb 16, 2009 1:59 pm

Beth wrote:How do you open the file? If you are using the View command, then there is a setting in Vault that can make all files on disk be read only unless a user specifically checks the file out for editing.
Yes, I'm using the right-click --> View option. For both "Edit" and "View", I've specified the executable "c:\bin\textpad\textpad.exe" as my choice.

Which option are you talking about? If I can set that (make all files being viewed automatically read-only on disk), then I guess my problem would be solved! :P

Marc

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Passing parameters to external programs

Post by Beth » Mon Feb 16, 2009 2:24 pm

In Vault go to Tools - Options - Local Files and look for the setting Make Writable. When you set that to read-only, all files are read-only UNTIL you check them out. If you check out a file, it is assumed that you intend to make changes and the file becomes writable.

Also, when you use the View menu option, you are viewing what is in Vault and not what is in your working folder. You can view your working folder through Edit, but you will need to have the option to check the file out cleared so that the file remains read-only.
Beth Kieler
SourceGear Technical Support

Post Reply