How do I create a macro in SlickEdit that will copy the file name and line number under the cursor to the clipboard?

StackOverflow https://stackoverflow.com/questions/15433490

  •  24-03-2022
  •  | 
  •  

Question

How do I create a macro in SlickEdit that will copy the file name and line number under the cursor to the clipboard? Try to limit the solution to functionality included in SlickEdit Version 15.0.1.3.

Was it helpful?

Solution

Here ...

(was a little counter intuitive as I thought I can use copy_to_clipboard, but that just copied where your cursor was ... but looking around the code where that was defined I also saw push_clipboard)

#include "slick.sh"
_command currpos_to_paste() name_info(',' VSARG2_MACRO )
{
  push_clipboard(p_buf_name':'p_line)
}

p.s. I don't think you should have any issues with running in v15, but I do not have that readily available at this moment

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top