Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Visual SlickEdit 10: open file from command line without clearing project state history

348 views
Skip to first unread message

DaveZ

unread,
Mar 14, 2006, 10:30:57 AM3/14/06
to
Hi,

Using VS10 on Windows, I am trying to solve a real annoyance that I have
when I launch VS to edit a file from the command line. This happens via
an association setup for txt files, a VS shortcut I have in my "SendTo"
menu, etc. If VS is already running, then the file is opened in a new
buffer within my current workspace. This is great and exactly what I
expect. However, if VS is not running, then VS will launch with my
previous workspace active, but the new file buffer completely replaces
and wipes out the workspace's previous state history. Is there anyway to
configure VS to launch while *adding* the file from the command line to
the state history of my previously opened workspace?

Thanks for any and all help on this,

Dave

darkknight

unread,
Mar 18, 2006, 7:32:51 AM3/18/06
to
On Tue, 14 Mar 2006 15:30:57 GMT, DaveZ <dzel...@sbcglobal.net>
wrote:

One possibility is instead of "sending" the file to slickedit, send it
to a utility that first runs slickedit without opening the file, then
invoke slickedit a second time but with the file - e.g. if you create
a batch file with the following

start L:\Apps\vslick\win\vs.exe
choice /td,1
start L:\Apps\vslick\win\vs.exe %1

then add a shortcut to the batch file to your sendto folder, if you
send a file to this batch file, the batch file firstly runs slickedit,
then waits one second, then invokes slickedit a second time but with
the desired file as a parameter. I had to add the "choice" command to
the batch file to get this to work on my system - without the delay,
I was getting two instances of slickedit invoked. You might need to
download choice.com from microsoft.
ftp://ftp.microsoft.com/Services/TechNet/Windows/msdos/RESKIT/SUPPDISK/CHOICE.COM

Something else you can do is have multiple slickedit config folders.
Then you can use one config for editing miscellaneous files and one
for normal project work.

Another possibility is to invoke slickedit with an extra command on
the command line that closes the current workspace e.g.
L:\Apps\vslick\win\vs.exe %1 -r workspace_close

Yet another possibility is to pass the name of the file you want to
open as a parameter to a slickedit command
L:\Apps\vslick\win\vs.exe -r mycommand %1

mycommand would be a macro you write something like
_command mycommand()
{
edit(arg(1));
}
Not sure if this would work as I haven't tried it.


Search for "invoking" in the help to see what options there are.

Graeme

DaveZ

unread,
Mar 18, 2006, 10:28:32 AM3/18/06
to
Graeme,

Thanks alot for all the suggestions! Sometimes you just hit a brick wall
in trying to come up with a solution when the answers can be so easy.

Again, much appreciated!

Dave

0 new messages