You are here: PSPad forum > English discussion forum > Multi-Line Search Add-On

Multi-Line Search Add-On

Goto Page: Previous1 2 3 4 5 6 7 8 9 10 11 ...LastNext

#11 Re: Multi-Line Search Testers Needed

Posted by: vbr | Date: 2006-10-13 12:14 | IP: IP Logged

Quote:
I'd really like to replace the ctrl-f hotkey for searching ...

You can use the parameter of "addMenuItem" in the scriptfile. (I set an alternative shortcut instead of replacing the default.) Maybe assigning to an existing shortcut could cause problems, or it could be necessary to remove it in Settings : Key Map.

Sub Init
addMenuItem "Multiline Search / Replace", "", "phReplace","Ctrl+Alt+F"
End Sub

Edited 3 time(s). Last edit at 2006-10-13 12:20 by vbr.

Options: Reply | Quote | Up ^


#12 Re: Multi-Line Search Testers Needed

Posted by: phdesigner | Date: 2006-10-17 07:41 | IP: IP Logged

New version of phReplace available at (http://www.phdesign.com.au/document.php?page=software_phreplace).

Changes include vbr's shift-left idea to find the start of a selection block, remembering the last window position when closed, fixed bug when trying to open phReplace if no document is open, replacing text within a selection with longer text (MrSpocks bug), highlighting all text in search box when starting, enabling pressing esc to exit the window, added the pspad icon and tried to add keyboard shortcuts to the buttons but this didn't seem to work on some systems.

I thought I had figured out how to start it in modeless form (so you can leave it open and still use pspad) but it turned out vbscript doesn't support modeless forms. Have tried upgrading the dll to .net (but this ment installing extra framework) and tried launching it from javascript but I'm still having issues.

Haven't forgotten about regular expressions either but it may be a week till I can spend some more time on it.

Keep the feedback coming.

Options: Reply | Quote | Up ^


#13 Re: Multi-Line Search Testers Needed

Posted by: vbr | Date: 2006-10-17 09:43 | IP: IP Logged

Thanks for the new version.

If I modify the last lines of phreplace.vbs as follows:

Sub Init
addMenuItem "Multiline Search / Replace", "", "phReplace", "Alt+Shift+F"
End Sub

(instead of the current code:

Sub Init
addMenuItem "Multiline Search / Replace", "", "phReplace"
End Sub
)

and recompile the scripts, the shortcut Alt+Shift+F works for me.
Setting Ctrl+F (not really intended by me) doesn't work however, as there is a shortcut set in Program settings - Key map - Search.
Maybe it could be necessary to clear these settings first in case of such a conflict, (I guess).

Options: Reply | Quote | Up ^


#14 Re: Multi-Line Search Testers Needed

Posted by: MrSpock | Date: 2006-10-17 10:55 | IP: IP Logged

Thank you. Gonna give it a try ASAP. smiling smiley

Options: Reply | Quote | Up ^


#15 Re: Multi-Line Search Testers Needed

Posted by: MrSpock | Date: 2006-10-17 11:44 | IP: IP Logged

Again, thanks for sharing this tool. I did a few test with the new version and didn't find anything to complain about. It is already extremely useful as it is now. Additional support for regular expressions would make it an uber-utility. winking smiley
Keyboard shortcuts (including the Escape key) work great for me.

Options: Reply | Quote | Up ^


#16 Re: Multi-Line Search Testers Needed

Posted by: phdesigner | Date: 2006-10-19 03:22 | IP: IP Logged

Thanks for the help with hot keys vbr, I've set the default key to be Ctrl+Alt+F, I think you're right that it could cause some issues using Ctrl+F, I'll leave it up to the user to change the default key mapping if they really want to.

I've also removed the maximise and minimise buttons as per your suggestion MrSpock, I found that if you tried minimising phReplace it actually minimised PSPad as well which is definitely not expected behaviour so it's better not to have them.

Options: Reply | Quote | Up ^


#17 Re: Multi-Line Search Testers Needed

Posted by: vbr | Date: 2006-10-19 08:53 | IP: IP Logged

Thanks for the new version 1.1.9 (From your post I wasn't quite sure, if you have allready uploaded it, but I found it actually on your page).
So maybe as a hint for other users:
www.phdesign.com.au

Thanks again.

Options: Reply | Quote | Up ^


#18 Re: Multi-Line Search Testers Needed

Posted by: Joe Belmaati | Date: 2006-10-19 19:39 | IP: IP Logged

Outstanding work. The indentation bug is gone. Also, thanks for adding the feature that remembers the last window postition. If you could add the ability to save the last window size that would be even better. Real nit-picky, I know. Great utility. I'm going to use it a lot :D

Options: Reply | Quote | Up ^


#19 Re: Multi-Line Search Testers Needed

Posted by: Arthur | Date: 2006-10-20 10:40 | IP: IP Logged

Great add-on, very useful.
Few things:

1. As already stated can window size be remembered

2. Window position: on my system (WinXP Pro) the window jumps to it's position it is very annoying sad smiley I suspect this is has to do with the sequence in which the code is written:
"create window, open window, set position"
maybe it can be changed to:
"create window, set position, open window"

3. Since it is a multi line search and tab key behaves as it suppose to in editor there is no way to jump through the dialog with a keyboard. Can Shift+Tab be set to act as Tab key when you in the Search/Replace fields?

4.When the dialog called with active selection shouldn't the "Selected Text Only" option be already checked

5.Can it have the same function, as Search dialog, damping search results list to log window ([List] button)

Options: Reply | Quote | Up ^


#20 Re: Multi-Line Search Testers Needed

Posted by: Anders | Date: 2006-10-22 15:57 | IP: IP Logged

Some feedback (some might have been suggested before):
* "modeless form" would be *really* usefull
* "search-as-you-type" - this can be a checkbox. When checked the search is performed upon keypress - a la Firefox
* Shortcut CTRL+ENTER for performing a search
* No max-width for the textboxes - so you can shrink the window even more without hiding the settings

And a bug report:
Doing a replce on many items causes phReplace to hang: Run-time error "6" Overflow.

Options: Reply | Quote | Up ^


Goto Page: Previous1 2 3 4 5 6 7 8 9 10 11 ...LastNext





Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR