Menu

Macro Recording & Run Tools

Gadrin
2008-03-24
2012-11-13
  • Gadrin

    Gadrin - 2008-03-24

    1.  Is it possible to use the FIND mechanism in a macro ? IE, I want to search for some text then find it and edit it. Right now I try recording and I get a blank recording ( hit CTL-F search for <a href=" then do something.)

    2.  Can tools be configured by the user ? For instance I want to open Explorer.exe to the current file's path. Right now it looks like I have to hit F5 then type all that in. Same with CMD.exe /k cd c:\somefolder\somepath. Or does that require building a plug-in ?

    Thanks!

     
    • Gadrin

      Gadrin - 2008-04-04

      Well, that might be, but I have access to a scripting language that essentially does the same thing. I can crawl HTML and work with the DOM quite nicely.

      The other being JassPa's MicroEmacs does actual keyboard macro recording quite nicely as a quickie alternative so for me it's 6-half-dozen...

      I must say Notepad++ is still impressive. I recently bought Ultra-Edit and discovered it just doesn't do some things well at all.

       
      • Fool4UAnyway

        Fool4UAnyway - 2008-04-04

        Well, ask your money back, then!

         
    • Greg Bullock

      Greg Bullock - 2008-03-29

      The initial FIND cannot be recorded in a macro, because macros record only keystrokes to the editor, Scintilla commands, and (some, but not all) menu commands, but they do not record keystrokes or mouse clicks to any of the dialogs such as the Find dialog.

      Macros can, however, record the F3 (Find Next) command.  So for some purposes, you can prepopulate the Find dialog with the desired strings/settings and close the dialog before recording a macro that includes F3.  If you're playing back the macro immediately, then no further work is needed.  If you're playing back the macro some arbitrary time in the future, and the Find dialog's values have changed in the meantime, then you'll have to repopulate the Find dialog once again before playing the macro.

      Regards.
      Greg

       
    • Gadrin

      Gadrin - 2008-03-29

      Well that's close but not quite what I need for Macros and Find.

      I'm using Macros to extract hrefs from HTML

      <span id="SomeID"><a href="SomeHref.html"><img more html
      into
      SomeHref.html

      for wGET. However I usually have to search for _href="_ then kill all
      the characters back to the beginning of the line, then search for the
      next _"_ unless I'm really lucky and there's no other double-quotes
      before the first one.

      too bad. I guess I'll have to use Jasspa's MicroEmacs, it's really
      slick for macro keyboard recording, unfortunately it's GUI isn't
      very nice.

      either that or SED to strip the hrefs quickly.

       
    • Gadrin

      Gadrin - 2008-04-03

      Ah, marvelous! This looks very nice. I was able to construct an effective macro in a few minutes. Thanks!