Open file on line and column in Visual Studio
Works in:
Microsoft Visual Studio 2008
Version 9.0.21022.8 RTM
See attached VSGoto.exe
Usage: Put files where you wish, hardcode the paths to the defines and in wbt file code below.
Files:
1) VSGoto.exe - main file, put anywhere
2) winbatch.exe - optional
3) winactivate@title.wbt - optional
Note:Intermittent failure to activate Visual Studio window neccessitates winbatch additionals.
#define WINBATCHEXE 'C:\WinBatch\System\winbatch.exe'
#define VSGOTO 'C:\batch\VSGoto.exe'
#define WBTWINACTIVATE 'C:\batch\winactivate@title.wbt'
int shell_winbatch(_str file='',_str parm='')
{
return execute(WINBATCHEXE ' ' file ' ' parm,'A');
}
_command void VSGoto() name_info(',')
{
f=p_buf_name;
l=p_line;
c=p_col;
s=VSGOTO ' "'f'" 'l' 'c;
execute(s,"a");
// you may need the following to activate VS - intermittent glitch
//shell_winbatch(WBTWINACTIVATE,'"~ Microsoft Visual Studio"');
}
File:C:\batch\winactivate@title.wbt
if winexist("WBT - C:\batch\winactivate@title.wbt")
WinHide("WBT - C:\batch\winactivate@title.wbt");
endif
if winexist("WBT - winactivate@title.wbt")
WinHide("WBT - winactivate@title.wbt");
endif
if param0==0 then
display(2,"Error","param1 Missing");
exit
endif
;if winexists(param1) then
;display(2,"p1",param1)
WinActivate(param1)
;;endif
Edit: newer version 2011.07