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!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Perhaps the Simple Script Plug-In may be of help to you.
There are StripLeft and StripRight functions and a lot of delete lines or copy to clipboard functions, which may eventually leave you with all the information you want.
I suggest, though, to have a similar function CopyBetweenTags or LeaveBetweenTags that copies or leaves only the desired information.
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!
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.
Well, ask your money back, then!
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
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.
Perhaps the Simple Script Plug-In may be of help to you.
There are StripLeft and StripRight functions and a lot of delete lines or copy to clipboard functions, which may eventually leave you with all the information you want.
I suggest, though, to have a similar function CopyBetweenTags or LeaveBetweenTags that copies or leaves only the desired information.
Suggested reading:
"Macro" (Open Discussion forum)
http://sourceforge.net/forum/forum.php?thread_id=1886493&forum_id=331753
"Need help with removing to end of line" (Help forum)
http://sourceforge.net/forum/forum.php?thread_id=1916496&forum_id=331754
"DeleteToTag in Simple Script not working" (Plugin Development forum)
http://sourceforge.net/forum/forum.php?thread_id=1976307&forum_id=482781
Ah, marvelous! This looks very nice. I was able to construct an effective macro in a few minutes. Thanks!
A macro?
Perhaps the references in the next thread will also help you.
"Feature Request: Multi Search" (Open Discussion forum)
http://sourceforge.net/forum/forum.php?thread_id=1994407&forum_id=331753
It contains the next reference to a description to quickly recude the number of lines you want to strip your information from.
"How to: copy lines by regex using TextFX Viz" (Help forum)
http://sourceforge.net/forum/forum.php?thread_id=1964719&forum_id=331754