Hi foufee, this example (ripped from my macro toolbox) could help:
(Note: <EXPR> and <TOOL> is pseudo code.)
...
// that's the key: _select_match() converts a hilited search hit to a selection
if ( !search(<EXPR>, "<R" ) ) _select_match();
if ( select_active2 () )
{
_str cur_sel_word = '';
int first_col, last_col, buf_id, junk;
/* get text out of selection */
_get_selinfo( first_col, last_col, buf_id );
if ( _select_type ()=='LINE' )
get_line( cur_sel_word );
else
cur_sel_word=_expand_tabsc( first_col,last_col-first_col );
_str cmdline = <TOOL> :+ " " :+ cur_sel_word;
shell (cmdline,"AP");
// or in the build window
// activate_build ();
// concur_command (cmdline, true, true, false, false);
}
...
Have fun, HS2