Forum Replies Created
- AuthorPosts
Stefan
ParticipantThat brings still the error on Line 2: “;” awaited
But adding an explicit >>#language =”VBScript”<< on the first line, let the script work.
#language ="VBScript" document.selection.StartOfDocument editor.ExecuteCommandByID 4472 ' no csv editor.ExecuteCommandByID 3889 ' Vertical Selection document.selection.Text = document.FullName + " " document.selection.Collapse()
HTH?August 14, 2025 at 8:44 am in reply to: Wish: “Find All” for “Find dialog” and list Results in Output window #30390Stefan
ParticipantWOW, wonderful Patrick, thank you.
I wish I would be that skilled ;-)
Thank you!
StefanAugust 12, 2025 at 9:07 am in reply to: Wish: “Find All” for “Find dialog” and list Results in Output window #30376Stefan
ParticipantThe Output Bar doesn’t support clickable lists.
So “Output Bar” was the wrong term used by me?
Then use a pane as for ex. the “List of Bookmarks” uses
for to show a list of found lines.
There are clickable links a standard behavior.
.
I do not suggest a new document, I suggest to have the
current document and the results list visible at once. Above each other.Thanks
August 12, 2025 at 4:01 am in reply to: Wish: option to create simple dialog boxes for scripts #30374Stefan
ParticipantThanks for the answer. That’s a good start.
How can I add two edit boxes to that dialog?
menu = CreatePopupMenu(); menu.Add( "Button 1", 1); menu.Add( "Button 2", 2); menu.AddEdit("do it". vDoIt) result = menu.MsgBox( "Header", "Body", ); if(vDoIt){ ..... }
ThanksAugust 12, 2025 at 3:48 am in reply to: Wish: “Find All” for “Find dialog” and list Results in Output window #30373Stefan
ParticipantThanks for the answer.
I know the Extract option and that is not what I suggest.
(even not with option “use outputbar”, but nifty some other time)I suggest a clickable list of found lines displayed in the OutputBar.
At the button and so viable together with the actual document.So we can see the document AND all the found positions
and quickly jump to them without losing the overview.Thanks.
August 12, 2025 at 2:19 am in reply to: How to see the line content in the “List of Bookmarks” ? #30371Stefan
ParticipantThanks PC, it never occur to me we can use OutputBar in a script.
sResult += Links[i] + Content[i] + “\n”;
OutputBar.write(sResult);.
Your script works wonderful and that it is what
I had envisioned: show me all bookmarket lines below of the file.Now I can find the wanted line and click on it to jump to the right place in my file.
Helps a lot while at coding to jump from a function to top of the file and back.
And also while reading a large text for to jump between chapters..
Only mouse-over highlighting and the use of the arrow-keys is lacking.
But clicking and pressing F10 works.A really helpful feature, I hope that will be a build-in feature in future.
Thanks
StefanAugust 10, 2025 at 11:18 pm in reply to: How to see the line content in the “List of Bookmarks” ? #30361Stefan
ParticipantThanks.
Since EmEditor is that fast, I don’t mind if it slows down in that matter.The benefit it much more important.
How about showing the first, say 50 bookmarks in the “List of Bookmarks” only.
And for the next 50 bookmarks show only limited amount of signs per line in the “List of Bookmarks”?
It would even help if we can see only ~50-70 signs of each bookmarket line in the “List of Bookmarks”.Thanks for considering it.
.
Stefan
ParticipantHello,
the script/macro “Reformat: break line at n-chars (VBScript)” still works in EmEditor v25.1.4Only the forum software had added additional line breaks which make the macro not working.
So, after copying the code to a local file, remove all empty lines.
(it’s okay to keep that few empty line which have white space in it,
only that completely empty lines, added by the forum (for me that are the grey one) have to go)To do that ,in EmEditor, have the file with that above code open,
right click and choose > “Convert Selection > Remove Empty Lines”.Also the both “Script Directives”:
#title = Reformat
#tooltip = Reformat: break line at n-charsmust be not indented but on Pos. 1
and also on line one and two without empty lines above .Furthermore, my step “4.) press F4” is true only if you had assign an keyboard shortcut to that macro.
On default, just use the menu “Macros > Run somename.vbee Ctrl+Shift+P”Also:
1.) Save the code between 8< and >8 -lines as text file “somename.vbee” in EmEditor folder
1b.) Remove the superfluous empty lines
1c.) Adjust the position of the #ScriptDirectives
2.) use Menu “Macros > Select…” and choose this somename.vbee as current default macro
3.) open an test file (try first on an test document!) and select some long lines
4.) press “Ctrl+Shift+P” to run the macro, you will be prompted to enter the max chars to break the lines
Your done..
Stefan
ParticipantFix confirmed in 904:
“Extract Bookmarked Lines to New File” works now from both compare panels for my setup too.
Thank you.Stefan
ParticipantAh, I wanted to add for the Crash :
– tested with files with 5 lines only, as shown in my first post
– Win 10.0.19044.1706 , 64-bit , 16GB RAM with 60% free at that moment.– – –
And, FYI:
on my test I missed a “swap files” option in the Compare menu (somehow as like in the “Compare with Options…” -dialog)
Maybe this would be also an idea to add..
Stefan
ParticipantHello Yutaka-san,
thank you for your advice and I want to ask to apologize my late response.
After I have found out what you are telling me (see below), I could see that it works somehow,
not nice for daily work, but at least there is one way. Maybe I can build a macro with that tips.Maybe this could also be considered as feature wish:
>> “compare two files for differences, not line-by-line wise as the compare tool does,
but whole files-wise, (compare each line of file A with each line of file B)”– Extract lines which are in first file only
– Extract lines which are in second file only
– Extract lines that are in both files common
– Link to “remove duplicate lines” -command– – –
Please note:
“Extract Bookmarked Lines to New File” works for me from the left-side document only.
If I try that from the right doc, I get a Crash (v21.7.0 , portable , with new “comparison results in one vertically split window” feature)
– – –Here is what I have done as you told me to this way:
– You could select Bookmark Changes on the Macros menu to set bookmarks on changed lines.
(Tools > All Commands… > Compare > Bookmark Changes)
– Then, select the Invert Bookmarks command to set bookmarks on unchanged lines.
(Tools > All Commands… > Edit > Bookmarks > Invert Bookmarks)
– You can then extract bookmarked lines.
(Tools > All Commands… > Edit > Bookmarks > Extract Bookmarked Lines to New File)
– This way might not distinguish between changes and added/delete lines, but might help.Thank you for making EmEditor
May 17, 2022 at 7:25 am in reply to: How to end Compare tool, restore window size and move file back? #28178Stefan
ParticipantHello Yutaka.
Thank you very much for your reply and the solution. (sorry for the late response of mine)Even thank you more for this new feature below :D
.
New in Version 21.7 (May 11, 2022)
New General Features
The new version displays file comparison results in one vertically split window by default
when you select the Compare or Compare with Options command.
The previously used tiled window display is still possible by setting options..
March 17, 2022 at 7:15 am in reply to: How to: Layouts – use EmEditor with minimal toolbars as text editor in TotalCmd #28100Stefan
ParticipantSwitching between layouts doesn’t remember open Plug-ins on the left (at least for me, I am on 21.5.2).
After switching back to a layout with before open Snippets-plugin the pane is closed and I have to re-open it.Maybe you can add a checkbox “[_]Remember open Plugin” to “Customize > Layouts – Options” ?
.
Just an hint ;-)
/StefanStefan
Participantspiros mentions that he have to escape the backslash \ in the regex replacement by doubling it to \\
Find: $
Replace: [\google]
(o) Regular Expressionmust be
Replace: [\\google]
(o) Regular Expression.
January 18, 2019 at 5:36 am in reply to: Replace text in multimple files ONLY in a specific XML tag #24195Stefan
ParticipantYou mean:
Search for .: T11:30:00</active
Replace with: T14:00:00</activePlain text search, no regex search.
?Stefan
ParticipantFROM:
+1(123) 456-7890 or maybe any variant of punctuation and spaces.
+1(123)456-7890, 123-456-7890, 123.456.7890
–
–
TO:
1123 4567890 or maybe any variant of punctuation and spaces
11234567890 1234567890 1234567890
–
–
USE:
Find: [(),.+-]
Replace:
[x]Use RegEx
[Replace All]– – –
Depending on your work, you can also include the space to the list of sings to become removed, like: [(),. +-]
.
.
.July 24, 2018 at 6:39 am in reply to: Add a way to search for a command in Keyboard configuration #23561Stefan
ParticipantMay I suggest to try “Quick Launch” Str+Q
https://www.emeditor.com/text-editor-features/user-experience/quick-launch/
..
1. open Quick Launch
2. search for part string(s) of a command name
3. click on found command
4. click in menu on > Keyboard Properties.
.
HTH
Stefan
Participant>>> as for example “de_DE@(.+?);” would much on too many places: <<<
I meant >>>> “match”
Sorry.
Stefan
ParticipantSo now you come with information!
If you have the same pattern on other places too, it is normal that they are deleted there too.
And your statement (((search “de_DE@(.+?);”, it works correctly))) is not true,
as this removes the pattern on other place too as well with the normal Search&Replace dialog.– – –
So conclusion, you can’t utilize RegEx here,
as for example “de_DE@(.+?);” would much on too many places:de_DE@Produktkatalog;
de_DE@Zubehör;
de_DE@Ersatzteilkatalog;
de_DE@CAD;
de_DE@Näherungsschalter;
de_DE@00991619;
de_DE@Stromversorgung;Better search for the complete unwanted strings:
de_DE@Stromversorgung;
ru_RU@Источники итания;
pl_PL@Zasilacz;
zh_CN@电源;
es_ES@Alimentación de corriente;
….And next time, please provide better information at first place ;-)
Bye.
Stefan
ParticipantDavid, best is to post how the text looks like after your test, so we can see what you see.
Stefan
ParticipantFROM:——————-
P_ARTICLE_DEPTH=”125″ P_ARTICLE_SPACING_FRONT=”0″ P_ARTICLE_SPACING_REAR=”0″ P_ARTICLE_DESCR1=”de_DE@Stromversorgung;en_US@Power supply unit;ru_RU@Источники питания;pl_PL@Zasilacz;zh_CN@电源;es_ES@Alimentación de corriente;fr_FR@Alimentation;it_IT@Alimentatore;nl_NL@Voeding;tr_TR@Güç kaynağı;hu_HU@Tápellátás;da_DK@Strømforsyning;cs_CZ@Zdroj napájení;pt_PT@Fonte de alimentação;sv_SE@Strömförsörjning;ko_KR@전원 공급 장치;no_NO@Strømforsyning;” P_ARTICLE_DISCONTINUED=”0″ P_ARTICLE_DISCOUNT=”0″TO:—————-
P_ARTICLE_DEPTH=”125″ P_ARTICLE_SPACING_FRONT=”0″ P_ARTICLE_SPACING_REAR=”0″ P_ARTICLE_DESCR1=”en_US@Power supply unit;” P_ARTICLE_DISCONTINUED=”0″ P_ARTICLE_DISCOUNT=”0″TRY:——————–
document.selection.Replace(“(de_DE|en|EN|fr_FR|ru_RU|pl_PL|zh_CN|es_ES|it_IT|nl_NL|tr_TR|hu_HU|da_DK|cs_CZ|pt_PT|sv_SE|ko_KR|no_NO)@.+?;” , “” , eeReplaceAll | eeFindReplaceRegExp,0);HTH? ;-)
February 8, 2018 at 1:05 am in reply to: [Ask for Help] Macro for replace the number located at the beginning of a row #22843Stefan
ParticipantYou have to add the zero’s padding yourself.
For example (a fix-two-digits result):
redraw = false; if( document.selection.IsEmpty ) { document.selection.StartOfDocument(); var iCount = prompt("Type the Start Number please:", "1"); var strFind = "^\\d+"; while(document.selection.Replace(strFind, iCount, eeFindReplaceRegExp | eeFindNext)) { iCount++; iCount = ("0"+iCount).slice(-2); } }
-or, more flexible (type in ‘1’, or ’01’, or ‘001’, or ‘0001’, …. to set the wanted amount of zeros:
redraw = false; if( document.selection.IsEmpty ) { document.selection.StartOfDocument(); var iCount = prompt("Start Number (incl. leading zero(s):", "1"); var iCountLen = iCount.toString().length; var strFind = "^\\d+"; while(document.selection.Replace(strFind, iCount, eeFindReplaceRegExp | eeFindNext)) { iCount++; iCount = ("00000000"+iCount).slice(-iCountLen); } }
June 9, 2017 at 6:28 am in reply to: Jump / go to / move to next empty line between paragraphs #21920Stefan
Participant“Yang Yang” wrote on June 8, 2017 at 9:21 pm
Continuous blank lines are not treated as a block, and the caret cannot be moved to TOF/EOF as advertised. Both are easy to customize, though.Here is a better code
//JumpToNextBlankLineBelow.jsee (Ctrl+Shift+Arrow-Down) Redraw = false; document.selection.Find("(\\w|\\.)$",eeFindNext | eeFindReplaceRegExp); if(document.selection.Find("(^\\s*?$)", eeFindNext | eeFindReplaceRegExp)==0){ document.selection.EndOfDocument();} document.HighlightFind = false; //Redraw = true;
–
//JumpToNextBlankLineAbove.jsee (Ctrl+Shift+Arrow-Up) Redraw = false; document.selection.Find("(\\w|\\.)$",eeFindPrevious | eeFindReplaceRegExp); if(document.selection.Find("^[[:blank:]]*?$",eeFindPrevious | eeFindReplaceRegExp)== 0){ document.selection.StartOfDocument();} document.HighlightFind = false; //Redraw = true;
–
But unfortunately the visible view doesn’t follow the cursor, if the cursor jumps out of view.
That means:
If the macro finds a line, the cursor is set to that line.
But is that line position is above or below the current visible view,
the windows is not scrolled to that line.But that happens only with “Redraw = false;” active.
If I comment that command out, the scrolling works again, but the search highlighting is disturbing then.Tested here with 16.8.1, as 32-bit portable.
January 20, 2017 at 1:33 am in reply to: MyMacros: allow hierarchic Folder support -or- New AllMacros menu #21468Stefan
ParticipantAnother Idea is to have a macro directive like
#MenuPath “Search&Replace macros”
to add to all macro files we want to sort hierarchic in EmEditors Macros menu.
So some of my macro files would contain
#MenuPath “Search&Replace macros” as first line
others
#MenuPath “Formatting macros”
other ones
#MenuPath “Change case macros”
and so on, and EmEditor would create a menu for that hierarchic structure
and put the macros with that directive into the right sub menu.
AllMacros\Search&Replace macros
AllMacros\Formatting macros
AllMacros\Change case macrosStefan
ParticipantYutaka, I typed in ENTER
Yutaka San did not want you to TYPE the word “Enter” literal into the document,
but rather to press the Enter key on your keyboard
while the cursor is after the last sign on the last line..
Hope that makes sense.- AuthorPosts