Is it possible for SlickEdit to receive input from an external program (e.g. tool made in vb.net)?
Is it possible to execute a Slick-C macro using an external program?
For example if my program sends a function name to a Slick-C macro which executes to focus the mouse on the function name found in the code.
I had a variety of problems getting this to work but I think this was mainly due to trying to run multiple versions of slick.
Write a slick macro like this
_command void GotoThisTag(...) name_info('VSARG2_CMDLINE,')
{
//say('hi');
if (arg() > 0) {
//say(arg(1));
push_tag(arg(1),true);
}
}
You can call find_tag instead of push_tag if you don't want a bookmark pushed. The second parameter to push_tag selects quiet-mode true - you might prefer false.
From a batch file, you can run it like this
start D:\apps\SlickEdit2007\win\vs.exe "-# GotoThisTag %1"
where %1 will be replaced by the parameter you put on the command line that invokes the batch file.
In slick help "invocation options" it says the -# switch executes the given command on the current buffer but that doesn't stop you executing any command at all with -#. You can try the -r option if you want but -# worked for me.
In Visual studio, if you're trying to run this as an "external tool", I found that with V Studio 2003, an extra quote is needed at the end of the "argument list" i.e.
"-# GotoThisTag $(CurText)""
and the command field set to
D:\apps\SlickEdit2007\win\vs.exe
so you might have to experiment, and pipe your VB output to a batch file that displays what the tool is actually sending.
Graeme