Author Topic: Macro recording: Find  (Read 1143 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2127
  • Hero Points: 190
  • Text
Macro recording: Find
« on: September 01, 2016, 06:14:36 pm »
If I record Search->Find, I get:
    _macro('R',1);
    execute('gui-find');
    if (find("xxx","IP")) stop();
Ctrl+F - mapped to gui-find gives:
    _macro('R',1);
    gui_find();
    if (find("xxx","IP")) stop();

If I record Search->find-in-files, I get
    _macro('R',1);
    _mffind2("xxx",'I','+t +h +s "C:\Program Files\SlickEdit Pro 21.0.0 Beta4\macros\',"*.txt",'',"192",'5');

If I record Ctrl+Shift+F (mapped to find-in-files) - I get the same thing as from the menu.


Why so many differences here?

What should it do?
Record the fact that I opened the Find dialog, or record the search command that was done?
For Find, it records both which is clearly wrong.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5605
  • Hero Points: 453
Re: Macro recording: Find
« Reply #1 on: September 02, 2016, 12:17:25 pm »
Looks like a bug. It should delete the call to gui-find.

When macro recording, there is auto-generated code and manually generated code. Commands execute from the menu (or command line) will be auto-generated as execute('whatever'). Key bindings calls can generate a function call for commands that are valid identifiers (not something like "/").