Recent

Author Topic: [SOLVED] SynEdit - How use macro  (Read 3740 times)

bubulemaster

  • New Member
  • *
  • Posts: 44
[SOLVED] SynEdit - How use macro
« on: August 31, 2009, 08:56:02 pm »
Hi,

I continue my french documentation about Lazarus's SynEdit component.
I try use SynMacroRecorder component but how use it ? How record (by defaut Shift+Ctrl+R I think) ? How stop ? How save ?
Do you know where I can find example ?

Thank you
« Last Edit: September 01, 2009, 08:59:51 pm by bubulemaster »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6675
  • Debugger - SynEdit - and more
    • wiki
Re: SynEdit - How use macro
« Reply #1 on: August 31, 2009, 11:51:02 pm »
I haven't looked at SymMacroRecorder before. From a quick exploration, it defines only 2 keyboard-shortcuts.

That happens in
  constructor TCustomSynMacroRecorder.Create(aOwner: TComponent);
    fShortCuts[mcRecord] := Menus.ShortCut( Ord('R'), [ssCtrl, ssShift] );
    fShortCuts[mcPlayback] := Menus.ShortCut( Ord('P'), [ssCtrl, ssShift] );

look at
  procedure TCustomSynMacroRecorder.OnCommand(Sender: TObject;
to see how they are used.

While recording:
- pressing the playback command will pause/resume
- pressing the record command will end recording.


Afaik the save and load methods will have to be called by the application. There seems to be no automatic way to save.

bubulemaster

  • New Member
  • *
  • Posts: 44
Re: SynEdit - How use macro
« Reply #2 on: September 01, 2009, 08:59:40 pm »
It's very easy.
To start recording press Shift+Ctrl+R
Stop recording SynMacroRecorder1.Stop;
Replay recording press Shift+Ctrl+P

Thank you

 

TinyPortal © 2005-2018