Forum Replies Created
- AuthorPosts
- LTTParticipantLTTParticipant
Check/uncheck some items in the list;
Click [Add to Batch] button;
* The check/uncheck operations are in vain now.December 13, 2012 at 7:17 am in reply to: Macro: (Menu) Toggle [Runs at Events] Option for Macros #10662LTTParticipantI rewrote the macro.
Now arrays are used to minimize the GetProfileInt/GetProfileString operations (now only once for each entry).nRunAtEvents = &h80000000
ii=0
Do
nEventsN = editor.GetProfileInt(eeRegMacros, sCfg, "Events"& ii, -1)
If nEventsN=-1 Then Exit Do
If nEventsN><0 Then
sMacroN = editor.GetProfileString(eeRegMacros, sCfg, "Macro"& ii, "")
sEventsN = Right("_______"& Hex(nEventsN), 8)
sN = Right(" "& ii, 7)
sMenuText = sMacroN &vbTab& sEventsN & sN
asMacroN = asMacroN &"|"& sMacroN
anEventsN = anEventsN &" "& nEventsN
aN = aN &" "& ii
asMenuText = asMenuText &"|"& sMenuText
End If
ii=ii+1
Loop Until ii>1023
asMacroN = Split(asMacroN,"|")
anEventsN = Split(anEventsN)
aN = Split(aN)
asMenuText = Split(asMenuText,"|")
nMenu = UBound(aN)
sMenuText = "▲Toggle Event-Driven Macros"& vbTab &" Max:"& Right(" "& ii-1, 6)
Do
Set menu = CreatePopupMenu
For ii = 1 To nMenu
menu.Add asMenuText(ii), ii, eeMenuChecked And anEventsN(ii)<0
Next
menu.Add "", 0, eeMenuSeparator
menu.Add sMenuText, 0, eeMenuGrayed
ii = menu.Track
If ii=0 Then Quit
anEventsN(ii) = anEventsN(ii) Xor nRunAtEvents
sEventsN = Right("_______"& Hex(anEventsN(ii)), 8)
sN = Right(" "& aN(ii), 7)
asMenuText(ii) = asMacroN(ii) &vbTab& sEventsN & sN
editor.WriteProfileInt eeRegMacros, sCfg, "Events"& aN(ii), anEventsN(ii)
LoopThe old code:
nRunAtEvents = &h80000000
Do
Set menu = CreatePopupMenu
ii=0
Do
nEventsN = editor.GetProfileInt(eeRegMacros, sCfg, "Events"& ii, -1)
If nEventsN=-1 Then Exit Do
If nEventsN><0 Then
sMacroN = editor.GetProfileString(eeRegMacros, sCfg, "Macro"& ii, "")
sMenuText = sMacroN &vbTab& Right("_______"& Hex(nEventsN), 8) & Right(" "& ii, 7)
menu.Add sMenuText, ii+1, eeMenuChecked And nEventsN<0
End If
ii=ii+1
Loop Until ii>1023
menu.Add "", 0, eeMenuSeparator
menu.Add "▲Toggle Event-Driven Macros Max:"& Right(" "& ii-1, 6), 0, eeMenuGrayed
ii = menu.Track -1
If ii<0 Then Quit
nEventsN = editor.GetProfileInt(eeRegMacros, sCfg, "Events"& ii, -1)
nEventsN = nEventsN Xor nRunAtEvents
editor.WriteProfileInt eeRegMacros, sCfg, "Events"& ii, nEventsN
LoopLTTParticipantThanks!
(eeFindSaveHistory)
So the CHM should be revised:
http://www.emeditor.com/help/macro/editor/editor_findinfiles.htm
http://www.emeditor.com/help/macro/editor/editor_replaceinfiles.htmLTTParticipantThese two issues are not fixed:
document.selection.Find( "strFind", eeFindNext | eeFindSaveHistory | eeFindReplaceQuiet );
Even the Quiet status persists. Use Find Next/Previous manually, if not found, no message on the status bar.
editor.FindInFiles … eeFindSaveHistory …
And there is no index for “eeFindSaveHistory” in FindInFiles/ReplaceInFiles.
LTTParticipantTo all,
You might have problems caused by your event-driven macros. Try and see if you need this macro:
http://www.emeditor.com/modules/newbb/viewtopic.php?topic_id=2139&forum=19LTTParticipantSorry, I found the reason:
I have an event-driven macro that runs at [Group Window Closed] etc. So this problem was because another macro ran during the macro running. (This is a limitation?)LTTParticipantSo the Load method can be used to get or set the properties of a non-current configuration. That’s what I wanted. Thanks.
Actually, document.Config.Save(“X”) duplicates the current configuration. So I used it to add a configuration.
Minor things:
I think “Delimiter” should be included in Highlight (1). (JSEE/VBEE, reset.)If I use document.ConfigName = “xml”, and the existing configuration name is “XML”, I think the status bar should display “XML”, rather than “xml”.
LTTParticipantThank you.
I have some more questions and hope you will give a reply.1.
I want to load the settings of the existing “X” configuration into the current one.
oCfg = document.Config;
oCfg.Load("X");
oCfg.Save();
But nothing happened.
How to use the Load method?2.
I can add a configuration by using document.Config.Save(“X”).
But is there a macro way to delete a configuration?LTTParticipantPlease see the video:
http://tinypic.com/r/2na4rbs/6November 17, 2012 at 12:39 pm in reply to: (document.selection.IsEmpty) Does Not Equal (document.selection.Text == "") ? #10633LTTParticipantDocument.write(“”) can be used to delete the text selected.
But document.selection.Text = “” can not.LTTParticipantdocument.selection.Find( "strFind", eeFindNext | eeFindSaveHistory | eeFindReplaceQuiet );
After this is run, all the options that belong to [Find/Replace in Files] now are cleared:
Display File Names Only
Keep Modified Files Open
Look in Subfolders
Save Backups
Use Output BarEven the Quiet status persists. Use Find Next/Previous manually, if not found, no message on the status bar.
LTTParticipantSelect an item (e.g. XXX);
Then click [Add];
(While the new item is still in editing mode) Name it with “YYY”;
Press Enter (or Esc) key;
*One might not notice that XXX is still selected. So if you go on to change the options, or click [Delete], you are operating on both YYY and XXX.Suggestions:
When [Add] is triggered, the other item(s) should be deselected.And, while more than one item are selected, [Up] and [Down] buttons should be disabled.
LTTParticipant+ Yet another case:
editor.FindInFiles … eeFindSaveHistory …LTTParticipantThank you.
+ other cases:
When the Find Bar is visible and “Set Word to Find/Replace” command is triggered…And, how about adding a “Freeze” option (button) on the Find Bar? — So one can keep the contents of Find Bar, unless he changes them manually.
LTTParticipantAnother suggestion for Find toolbar:
Hope the width of the input boxes can be adjusted by dragging the right edge of the boxes, like how we do on the Google toolbar in the web browser.
October 8, 2011 at 12:32 am in reply to: Find in Files; Independent Process; Pinned; Recent File List #9725LTTParticipantHere are two examples:
E:Charles Lamb (1775-1834) and Marry Lamb (1764-1847)Tales From Shakespeare.txt(1):
E:Jerome K. Jerome (1889) Three Men in a Boat.txt(1):What we see when “document.HighlightTag = True”:
Is it possible to specify the Tag Format to cover such paths/filenames?
October 8, 2011 at 12:25 am in reply to: When focus is in Find toolbar and I close Find toolbar #9724LTTParticipantAnother two issues:
After inputting in the Find box, click the “Replace >>” button. The text just inputted should be kept in the Find box.
When the text in the inputbox is selected, the cursor cannot be set in the selection by using the mouse.
October 2, 2011 at 8:58 am in reply to: Find in Files; Independent Process; Pinned; Recent File List #9710LTTParticipantMy original report in the first post was:
(.*)x20
Anyway, I hope there will be a solution.
October 1, 2011 at 2:26 pm in reply to: Find in Files; Independent Process; Pinned; Recent File List #9707LTTParticipantYutaka wrote:
Did you try and see any issues?Try such a file name:
file(1) + file(2).txt
In case you didn’t notice this:
LTT wrote:
See if the 1st issue can be reproduced when WordComplete is enabled.LTTParticipant“UseUniscribe = 1” works.
Thank you!
September 30, 2011 at 1:16 pm in reply to: Find in Files; Independent Process; Pinned; Recent File List #9701LTTParticipantSee if the 1st issue can be reproduced when WordComplete is enabled.
Is it possible to resolve the 4th issue by customizing this setting?:
Customize >> Edit >> Tag Format >> Find
(I tried but didn’t achieve the purpose.)LTTParticipantI also met this annoying issue since v11 and can reproduce it with many (maybe most) of my fonts, except for a few (e.g., Fixedsys).
Tested with all the registry data removed and without any plugin.
For example, input “AAAA” before 2 or more tabs.
“AAAAtt+” is expected.
But the actual result is “At+AAAt”.Or, double click a word, the following tabs will be inevitably selected.
LTTParticipantYutaka wrote:
3. It is possible that you might escape a backslash when you use a command line, and escape again when using escape sequences.I don’t get it yet on issue 3. Could you explain a little further please?
It seems this only happens when the FindWhat string is ended with a backslash. Examples:
* To find “” (1 backslash), I have to use “\” as the FindWhat string in the command line.
* To find “” (2 backslashes), I have to use “\\”.
* To find “a” (an “a” and a backslash), I have to use “a\”.But to find “a” (a backslash and an “a”), only “a” is needed. Only this one is in line with my expectations.
LTTParticipantYutaka wrote:
2. Can you please create a sample file, and explain what you expect as a result? You might want to zip your sample file, and send it to [email protected], and please identify yourself as a forum member.For example, the original text:
1-2-3-4-5-
My goal:
1‰
2‰
3‰
4‰
5‰If I replace “-” with “x{2030}n” (which I think is a correct regular expression), the result is:
1‰n2‰n3‰n4‰n5‰n
If I use “x2030n”, the result is:
1‰2‰3‰4‰5‰
I achieved my goal by using “x{2030}n” or “x2030n”.
But how to understand the excessive backslash(es)? - AuthorPosts