Author Topic: Can a macro be called automagically?  (Read 3851 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: 2761
  • Hero Points: 292
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