How do I change this macro to use the selected string, rather than a predefined string. That is, I want the string "WellDataInfo_Test_" to be changed to be whatever the user is selecting at that moment.
#include "slick.sh"
_command my_renumber() name_info(','VSARG2_MARK|VSARG2_REQUIRES_EDITORCTL)
{
int not_found = 0; /* boolean to terminate loop */
int iLoop = 0; /* Counter to renumber items */
/* Use search initially; if that call doen't find an item, we're done. */
if (search('WellDataInfo_Test_:i', 'R') != 0)
{
not_found = 1;
}
while (!not_found)
{
if (search_replace('WellDataInfo_Test_' :+ iLoop/2, 'R') == STRING_NOT_FOUND_RC)
{
not_found = 1;
}
iLoop++;
}
}