mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 252
T
Talon Offline OP
Fjord artisan
OP Offline
Fjord artisan
T
Joined: Dec 2002
Posts: 252
On the most recent:

1) When I click the validate button, it indeed validates brackets, but appears to now be a "toggle" rather than a button

2) Replace all does not work....

Make a new script. make some lines

Code
alias Foo.a { }
alias Foo.b { }
alias Foo.c { }
alias Foo.d { }
alias Foo.e { }

Goto find: search for Foo. and replace with Bar.


mIRC does NOT replace any, yet rather just jumps to the first match and selects it.

Joined: Dec 2002
Posts: 5,443
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,443
Quote
1) When I click the validate button, it indeed validates brackets, but appears to now be a "toggle" rather than a button
I have not been able to reproduce an issue with this. If I click the button, it aligns text, checks for invalid brackets, and so on. If I click it again, it does the same thing. Can you describe your issue a little more?

Update: if you are referring to the appearance of the button, ie. it is highlighted/unhighlighted, I see this as well. This seems to be standard dialog behaviour when a different button from the default is clicked. It has behaved this way at least as far back as v6.35. So far, I cannot see a way around it.

Quote
2) Replace all does not work....
As far as I can tell, this is working correctly here. If I paste your text into the editor, move the cursor to the top, and "replace all", it works as expected. Is it possible that you have left the cursor at the bottom of the page? It will only replace from the cursor onwards. If it cannot find any more items, it beeps to indicate it has reached the end of the file. mIRC is behaving in the same way as Notepad++ (that was the purpose of the change in v7.73, Item 18, to make the dialog work like most applications - in this case, I often use NotePad++, which is probably one of the most widely used text editors, so I modelled it on that). That said, Notepad++ has a "wrap around" option in the find/replace dialog, which mIRC does not have. I may add this in future.

Update: I have found an issue which sounds like the one you were reporting. This is not related to "Replace all" but to clicking the Find button to find an item and then clicking the replace button. It skips the first replace in that case. This has been fixed for the next beta.

Last edited by Khaled; 13/01/24 04:54 PM.
Joined: Jul 2006
Posts: 4,157
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,157
The issue that you fixed in your "Update:" was the issue being reported, all good.


Since you mention wanting to make it more like notepad++, it has been asked for many years to have regex support search in all the find dialog, channels etc as well as the script editor, would you consider adding them in the future as well?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jul 2006
Posts: 4,157
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,157
With the current behavior, when we search a single file and there is no match found and the script editor jumps back to the beginning of the file, not only we lose the current location in the file, but we also no longer are able to get the previous match using shift + f3, is this latter behavior expected?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,443
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,443
Quote
is this latter behavior expected
Yes, this is the intended behaviour. However, it sounds like you don't like it jumping the top of the file when a forward search ends? After testing it out, I think it might make more sense for it to stay at the last found item. This is actually the way that Notepad++ works, which is what I was modelling the behaviour on. This change will be in the next beta.

Last edited by Khaled; 25/01/24 01:44 PM.
Joined: Jul 2006
Posts: 4,157
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,157
Quote
Yes, this is the intended behaviour. However, it sounds like you don't like it jumping the top of the file when a forward search ends? After testing it out, I think it might make more sense for it to stay at the last found item. This is actually the way that Notepad++ works, which is what I was modelling the behaviour on. This change will be in the next beta.
I'm not a big fan of that behavior, it's only good when replacing and at least one match was found, to indicate there's no more match. Will it keep beeping in this case to indicate there's no more match, while staying at current position? This should also mean that shift + f3 will then work.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,443
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,443
Quote
I'm not a big fan of that behavior
Okay, I will revert the change. I will see if I can make Shfit+F3 work in the same way as F3 currently does, ie. make it jump to the bottom of the page if no match is found.

Joined: Jul 2006
Posts: 4,157
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,157
Sorry I meant to say that I didn't like the current behavior in the stable release/beta, not the behavior that you changed it to. I do prefer what you said you would change it into over the current behavior.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,443
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,443
Okay, I have been experimenting with it, so haven't settled on a behaviour just yet. Let's see how the next beta works out.

Update: I have uploaded a beta with some changes. I decided to stick with the Notepad++ style wrap-around behaviour as I found that more useful and have extended it to Shift+F3. I also made a few other changes to the editor that should hopefully be useful.

Last edited by Khaled; 29/01/24 12:50 PM.

Link Copied to Clipboard