AtSynEdit - Example Macro Code

Post Reply
TomC
Posts: 13
Joined: 29.05.2022 05:11

AtSynEdit - Example Macro Code

Post by TomC »

Hello,

I've been learning how to use AtSynEdit, but have been really struggling with:
- Macro Record
- Macro Playback

I was wondering if someone could show some example code, with events etc..
(this could be a nice addition to AtSynEdit Demo's Folder, as well)

Thank you most sincerely..
main Alexey
Posts: 2300
Joined: 25.08.2021 18:15

Post by main Alexey »

CudaText does it OK. It handles events OnCommand, OnCommandAfter.
In OnCommand you handle command codes. if it is cmd_MacroStart (it's CudaText constant) then you remember that 'macro record begins'.
if it is cmd_MacroStop then you remember that 'macro record stops'.
if it is another command, which you want in macros, and flag "macro begins" is set, you remember that command in a list.

==========
Later yon playback that recorded command codes using TATSynEdit.DoCommand().
Post Reply