Author Topic: How to select correct instance of SlickEdit?  (Read 4806 times)

at5dapa1

  • Senior Community Member
  • Posts: 282
  • Hero Points: 24
How to select correct instance of SlickEdit?
« on: October 03, 2017, 08:02:09 AM »
From several external log tools I invoke SE to jump to the file-name and line-number (using some regular expressions), so I can see where and why the log was generated.
Sometimes I have 2 instances of SE with 2 projects (a sender and a receiver) and have both logs in the external tool. When I invoke SE it always jumps into the first SE instance, so if I do it from the other log (which should actually go to the second SE) then the first SE will not find the file-name, which is correct.
Is there any way from SE macro (or even dll) level to detect the other SE instances and, if they are, to pass the call to them?

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: How to select correct instance of SlickEdit?
« Reply #1 on: October 03, 2017, 10:30:14 AM »
You might be able to use DDE on Windows - dynamic data exchange.  Have a look at DDE in the help and the command DDE in files.e,  also the editor_name function.  A long time ago I tried using DDE between two slick instances and it worked.  There's also a _list_processes function.
int _list_processes(PROCESS_INFO (&process_list)[]);

You could also do it using one second timer callbacks in each instance of slick that read a particular file to see if there was a new file that should be opened - or something like that.

timer_handle = _set_timer(1000, timer_callback1);
// ...
static void timer_callback1()
{
}






at5dapa1

  • Senior Community Member
  • Posts: 282
  • Hero Points: 24
Re: How to select correct instance of SlickEdit?
« Reply #2 on: October 04, 2017, 09:28:29 AM »
Great info! Thanks a lot!