Passing parameters to external programs
Moderator: SourceGear
-
- Posts: 28
- Joined: Tue Feb 17, 2004 7:42 am
- Location: UK
- Contact:
Passing parameters to external programs
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?
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?
Re: Passing parameters to external programs
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
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
Re: Passing parameters to external programs
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
SourceGear Technical Support
Re: Passing parameters to external programs
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.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.
Marc
Re: Passing parameters to external programs
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
SourceGear Technical Support
Re: Passing parameters to external programs
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.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.
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!
Marc
Re: Passing parameters to external programs
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.
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
SourceGear Technical Support