Author Topic: Can a macro be called automagically?  (Read 1410 times)

Margaret

  • Community Member
  • Posts: 70
  • Hero Points: 0
Can a macro be called automagically?
« on: August 24, 2015, 06:34:50 pm »
I'd like to write some syntactic-sugar macros that should run without being manually invoked.  For example, I need not color a specific identifier as a function because slick spots the following parens and defaults to function color.  I'd like to do similar things for other types of token special to my code.  Is that possible?  The docs only mention calling a macro by typing in its name, and by pressing a key/chord to which it's been bound.

hs2

  • Senior Community Member
  • Posts: 2728
  • Hero Points: 282
Re: Can a macro be called automagically?
« Reply #1 on: August 24, 2015, 08:44:54 pm »
There is a possibility using SE callback hooks (search the forums) which are automagically invoked by SE framework on various events e.g. when opening a file resp. buffer. To support kind of background processing some macro authors are using timers/timer callbacks.
Good luck, HS2