Forum Replies Created
- AuthorPosts
- May 15, 2013 at 5:26 am in reply to: Let us create better dialogs to ask the user for his options. #11044StefanParticipant
Hi Yutaka,
have you think about a way to implement
such GUI-features to the macro language?Mostly I need the possibility to show
a dialog with a few check boxes, radio buttons
and input/edit fields. Maybe drop-down list too.Then I want to get back what the user has entered/selected
and work on that information to further execute my code.I have seen that possibility in some ways already
and if you need some ideas/inspirations please let my know.But please be more communicative and talk with your usership
to let them know what you think and if the suggestion have
a change to get implemented or not.It’s not that nice to have monologues mostly ;-)
Join the chat.
Thank You
StefanStefanParticipantHi Yutaka,
I see no response from you?
Are you able to improve the zero-width column manipulation?
Should I provide better explanation or demo videos?
Stefan
StefanParticipantzhouzh2 wrote:
In this verion, the Find&Replace dialog can’t be resized vertical, therefore one can’t do multiline Find&Replace, am I missed something?You have to enable ‘multi line mode’ first
by clicking on the ‘[>]’ button in the find dialog
and checking the ‘Multiline’ entry..
May 10, 2013 at 11:33 am in reply to: Code Navigation: GoBack/GoForward + "Jump to a Previous View" #11037StefanParticipantI was also searching for enhancement
of the “Move to Last Edited Position” function.If possible I would like to have the possibility
to cycle through the last ten* lines
where a modification were made.If I reach the tenth (or just last in list) modified line,
the next using of this command will turn around
to the most recent modified line.* maybe configurable?
Thanks.
StefanParticipantYutaka wrote:
Stefan wrote:
Yutaka wrote:
Updates from beta 4 include:
– The Quick Launch window now includes options
and allows you to access a searched dialog box.What does this means?
Where can I see this ‘options’?
How am I able to ‘access a searched dialog box’?All of these items in this screenshot are either Configuration Properties or Customize. By double-clicking one of these items will take you directly to the corresponding dialog box.
My assuming is that you want to say:
“””
Before beta 5 you were able to search
for the whole Property dialog as such only.
E.g. ‘Tools > Marks Properties’Now you can even search down to the the single options,
like ‘Show Spaces’ to find
‘Properties for Current Configuration > Marks > Show Spaces’
“””That’s Fine!
Do I assume that right here?But that seems not work reliable enough?
I can find my example above
— by typing ‘show ‘
— and also by ‘show s’
— but not by using ‘show spaces’ or even ‘show sp’
— and not by ‘spaces’ alone
which will find only ‘Show White Spaces’ among others.
Close enough, but…– – –
And what means now ‘access a searched dialog box’?
Do you refer here to the displayed list
in the ‘Quick Launch window’ after typing an expression?
*confused*– – –
Improvement wish:
please would you enable the history for the search drop-down edit? (the search field)
Because I have no history there (working portable)Thank you.
StefanParticipant.
Yutaka wrote:
Updates from beta 4 include:
– The Quick Launch window now includes options
and allows you to access a searched dialog box.What does this means?
Where can I see this ‘options’?
How am I able to ‘access a searched dialog box’?Please elaborate. Thank you.
.
StefanParticipant
I can’t tell, I think mostly I just don’t care about this.An forum search discovers that old thread
http://www.emeditor.com/modules/newbb/viewtopic.php?topic_id=1283&forum=15but I guess that is unrelated to your issue?
.
StefanParticipant
“Multiple Selection Editing” works very well after a few testsand is surprisingly also very useful
in many ways I never had thought about before.
.
StefanParticipantPosted on: 4/17/2013 1:12 am
EmEditor Professional v13 beta (12.9.0) released!$(AppDir), $(AppDrive), and $(Clipboard) parameters
were added to the External Tool Properties.Thank you Yutaka.
Tested an it works as indented.
Any change the ${} equivalent form
will be added to the Snippets Plugin too?– – –
Examples for $(AppDir)and $(AppDrive) on Tools:
– having EmEditor on an Thump-Drive:
U:SB-DriveEmEditor
– having an compiler or interpreter there too:
U:SB-DriveWork
– you want to call that tool from within EmEditor
but the drive letter of the USB drive changes on every PC
so you can’t just point to U: always?One way is to use this new parameter $(AppDrive)
which points to the current drive letter EmEditor is started from:
$(AppDrive):SB-DriveWorkIf you have your tool in an sub folder of the EmEditor folder
and you don’t want to work with relative paths because that
always confuse you, you may want to use the new parameter
$(AppDir) which point to the folder EmEditor is started from:
?:SB-DriveEmEditor.
StefanParticipantPosted on: 4/17/2013 1:12 am
EmEditor Professional v13 beta (12.9.0) released!$(AppDir), $(AppDrive), and $(Clipboard) parameters
were added to the External Tool Properties.Thank you Yutaka.
Tested an it works as indented.
Any change the ${} equivalent form
will be added to the Snippets Plugin too?.
StefanParticipant“Switch Starting Point and Ending Point command (SHIFT+F8)”
Posted on: 4/17/2013 1:12 am
EmEditor Professional v13 beta (12.9.0) released!Along with multiple selection editing, vertical selection
editing has been enhanced. For instance, pressing BACKSPACE
with the zero-width vertical selection now removes the last
character in each line. This allows you to remove the end
portions of text in multiple lines more easily than ever!Moreover, the Switch Starting Point and Ending Point
command (SHIFT+F8) was added. Before the new version, you
could move the ending point by pressing arrow keys while
pressing the SHIFT key, but couldn’t move the starting
point. Now with the new version, you can move the cursor to
the selection starting point by pressing SHIFT+F8, and then
adjust the selection starting point.Thank you Yutaka, please let me try:
That shortcuts is not “registered” in the beta download.
Luckily we have “Help > Keyboard Map… “
Or now tThe new Quick Launch command)
Just search for ‘point’ and add Shift+F8 as shortcut.To let it work you have to make a selection first,
than you can switch the current working point
by pressing (SHIFT+F8)For example, if you had done a selection to the left,
pressing (SHIFT+F8) will move the working point (Me means the zero-width selection line)
to the right side of this selection.Try:
– make a zero-width selection first.
– hold Shift and press L/R arrow keys
to create an selection, even one column will do.
– press (SHIFT+F8)
– hold Shift and press L/R arrow keys,
now you can resize the selection from
the other end of that selection.Nifty to move to the wanted column:
– make a zero-width selection somewhere near the wanted column.
– hold Shift and press L/R arrow keys to create an
selection till to the wanted column.
– press (SHIFT+F8)
– hold Shift and press L/R arrow keys, now resize the
selection till you get a zero-width selection again.– –
This will work at start of line or in the middle,
but not at the end of line (?).
At the end of line I can’t make a selection to the left.I also can’t move the working point (the zero-width selection line)
anymore after I have typed something,
i.e. you can’t move the zero-width selection from column
to column to do several modifications.But that was what I have tried to suggest above.
Or did I miss something here?I think it would work as I suggested if not this would happen:
>> “I also can’t move the working point anymore after I have typed something, “But after I typed something I can’t move the working point to another column.
OK, it’s because we are still in editing mode.
Pressing (SHIFT+F8) don’t help here anymore :-)More on this if I may?
* Backspace, to delete to the left, works on EOL only,
not in the middle of the line.* Del, to delete to the right, works nowhere with
an zero-width selection only.For both we can do a selection to the left or right first, and then press Del to remove the signs.
Here I found an example of this zero-width selection moving:
https://www.youtube.com/watch?v=yz1NoXnjzPo
Maybe that video can better explain what I had in mind :-).
StefanParticipantPosted on: 4/17/2013 1:12 am
EmEditor Professional v13 beta (12.9.0) released!“Skip Empty Lines” and
“Restart Numbering after Empty Lines” check boxes
were added to the “Insert Numbering” dialog boxWork as wanted, thanks.
For them who don’t know how to use:
– do an zero-width selection in front or at the end (or even in the middle)
of the lines you want to add numbers on.
(e.g.: hold Alt-key, press left mouse-key and draw a tiny line down)– press At+N to open the “Insert Numbering” dialog box,
made your settings and click at OK, the numbers are inserted.Extra tip: you can even enter leading zeros
into the ‘First Line’ field >>> [ 001 ]You may want to add additional signs like ‘.) ‘ after the numbers?
Then just do that after the insertion,
but while still in selection mode. Just type it!Or do an another zero-width selection and add the signs at an second step.
(you will have to remove this additional signs from
the beforehand empty lines in between, if any, though).
StefanParticipant
WOW great work again Yutaka!And you even minimize the size of the EE files even more on every release it seems ;-)
Here are my first test from top to down on new features.
I only mention what I just have seen on my tests.#######################################################
“Multiple Selection Editing”
Great feature!!!But it selects no line enders?
Test:
– select a few lines
One
Two
Three
One
Four
One
– copy to clipboard
– past in new doc,
>>> all are on one single line? >>> OneOneOneSolution:
you have to do the selections including the line enders.
F.ex. it works as I wants if I select a whole line by clicking at the line number gutter
or by triple clicking the line.
One
One
OneIt doesn’t include line enders if I only just select the line from start till end.
That’s normal, it’s indented, but one have to think on it ;-)#######################################################
“Add Next Occurrence”, “Select All Occurrences”
Hmm, Ctrl+R / C+S+A don’t work on
One
Two
Three
One
Four
OneSolution:
that shortcuts are not “registered”
Search > Add Next Occurrence
Search > Select All Occurrences
(Luckily we have Help > Keyboard Map… ;-) )Now it works.
But it have no option to match “Whole word” only?
F.ex.:
Fun
Work
Fun
Party
Function one()
Function two()I think there should be such an option.
Or one have to be very careful an using this feature.
Especial on renaming a variable name.#######################################################
“Switch Starting Point and Ending Point command (SHIFT+F8)”
I had to register this shortcut too.
Now I can’t see who it should work… have to try more!
—-
(I was only able to freeze the current document view one time
by doing an non-zero-width selection at the end
and pressing Shift+F8.
But now I can’t reproduce it again)
EDIT:
now I had this “freeze” again on doing an block selection
by holding Alt-key and drawing an rectangle with left mouse button
and then pressing Del-key.
This document and most parts of EE are frozen and I had to kill EE.
——-EDIT:
I think I got it now:
You have to make a selection first, than you can switch
the current working point by pressing (SHIFT+F8)For example, if you had done a selection to the left, pressing (SHIFT+F8)
will move the working point to the right side of this selection.
See:
– make a zero-width selection first.
– hold Shift and press L/R arrow keys
to create an selection, even one column will do.
– press (SHIFT+F8)
– hold Shift and press L/R arrow keys,
now you can resize the selection from
the other end of that selection.Nifty to move to the wanted column:
– make a zero-width selection somewhere near the wanted column.
– hold Shift and press L/R arrow keys to create an selection till to the wanted column.
– press (SHIFT+F8)
– hold Shift and press L/R arrow keys, now resize the selection till you get a zero-width selection again.This will work at start of line or in the middle, but not at the end of line (?).
At the end of line I can’t make a selection to the left.I also can’t move the working point anymore after I have typed something,
i.e. you can’t move the zero-width selection from column to column to do several modifications.
But that was what I have tried to suggest on this other thread
> http://www.emeditor.com/modules/newbb/viewtopic.php?topic_id=831&forum=4&post_id=7232#forumpost7232Or did I miss something here?
Here is how I had in mind how it should work:
https://www.youtube.com/watch?v=yz1NoXnjzPo———————
Tested again:
I think it would work as I suggested if not this would happen:
>> “I also can’t move the working point anymore after I have typed something, “But after I typed something I can’t move the working point to another column.
OK, it’s because we are still in editing mode.
Pressing (SHIFT+F8) don’t help here anymore ;-)—
More on this if I may?
* Backspace, to delete to the left, works on EOL only, not in the middle of the line.
* Del, to delete to the right, works nowhere with an zero-width selection only.
For both we can do a selection to the left or right first, and then press Del to remove the signs.#######################################################
“The Find All button was added to the Find dialog box”
Very welcome and nifty.#######################################################
“Skip Empty Lines” and “Restart Numbering after Empty Lines” check boxes
were added to the “Insert Numbering” dialog boxWork as wanted, thanks.
For them who don’t know how to use:
– do an zero-width selection in front or at the end (or even in the middle) of the lines you want to add numbers on.
(e.g.: hold Alt-key, press left mouse-key and draw a tiny line down)– press At+N to open the “Insert Numbering” dialog box, made your settings and click at OK, the numbers are inserted.
Extra tip: you can even enter leading zeros into the ‘First Line’ field >>> [ 001 ]
You may want to add additional signs like ‘.) ‘ after the numbers?
Then just do that after the insertion, but while still in selection mode. Just type it!Or do an another zero-width selection and add the signs at an second step.
(you will have to remove this additional signs from the beforehand empty lines in between, if any, though)###################################
“Quick Launch”
Can be found under “Tools > All Commands… > Tools”
or via “Help > Keyboard Map…” and search for ‘quick’.
I have assigned Alt+Q as shortcut.Now I am able to press Alt+Q to open “Quick Launch” and start typing an command
I am interested in, e.g. ‘chm’ or ‘exe’ to see a list of my external tools.Or ‘delete’ to see a list of all available delete commandos.
Don’t works for every single setting in the properties dialog, but to open
the main settings dialog it works well. Test it: ‘wrap pro’ or try ‘cust’But it work e.g. to re-open recent opened files: ‘txt’ or ‘recent’
It seems not to work to navigate in current doc like
jumping to line ‘n’ or to first line containing ‘foobar’.
Me means something like “Type ‘?’ to search within the
file, or ‘:’ to go to a line number.” Idea? ;-)Like [ ?funct ] will jump to next function line,
and [ :11 ] will jump to line 11.
Would also be nice to have a joker sign like ‘*’ to match even on un-complete strings,
like [ *licenetxt ] would match on “LicenCe.txt” or “LicenSe.txt”###################################
“Block Comments”
The Comment/Uncomment commands now work as begin/end comments
(for example, /* … */) in addition to line comments.
EmEditor will choose begin/end comments when the middle of a line is selected.This come in handy too.
How-to:
to add an block comment on whole lines,the selection must not start at pos 1.
Just add one space there and select from column 2 on.
For the end there is no such work around needed.On the other hand, if you start at column 1,
a line comment is added for each single line.#############
Well done. Congratulations.
to be continued…
StefanParticipant
Thank you very much for feedback.To not disturb you that much
I will not answer on all status messages of you
if I have nothing more to say than Thank You.Only if I think I should mention new ventilations,
for you to consider them beforehand the implementing is done.I hope that is fine with you.
StefanParticipant
Woohoo :-DThat works! Many thanks.
But leads to next question:
how to determine between line and block selection?The answer I found in the help:
EmEditor Help – EmEditor Macro Reference – Selection Object
Mode PropertySo I can use code like this:
nMode = document.selection.Mode;
switch( nMode & eeModeMask ) {
case eeModeStream:
alert( "Stream selection mode.");
work();
document.selection.text = out;
break;
case eeModeLine:
alert( "Line selection mode." );
work();
document.selection.text = out;
break;
case eeModeBox:
alert( "Vertical selection mode.");
oldCB = clipboardData.getData("Text"); //store
work();
clipboardData.setData("BoxText", out);
document.selection.Paste(eeCopyUnicode);
clipboardData.setData("Text", oldCB); //re set
break;
}
if( nMode & eeModeKeyboard ) alert( "And also the keyboard selection mode." );
function work(){
sel = document.selection.text;
Lines = sel.split("rn");
out = "";
for(L=0,E=Lines.length; L<E; L++){
line = Lines[L];
out += line.replace("i", "X");
if(L<E-1)out += "rn";
}
alert(out);
}
Fun! 8-)
… I gonna try this now for my real work.
Thank you much Yutaka!
StefanParticipant.
Thank you for feedback!
Now I know what will happen and can sleep calm :-D
.
StefanParticipantStefanParticipantuser wrote:
hello!how can I return the number of found regex matches?
how can I select the regex matches?
thanks!
One could utilize a macro like this basic example:
//Text to parse for RegEx:
selText = document.selection.text;
//Show matches:
vResults = findMatches(selText);
alert(vResults);
function findMatches(inputStr){
//Build an expression to match what you want:
//var regex = /dddd/ig; // match 2013
var regex = /www..+?..{2,3}/ig; //match www.emeditor.com
//To avoid errors, check beforehand if test is successful:
if(regex.test(inputStr)){
//if test was ok, collect matches:
result= inputStr.match(regex);
//some cosmetic:
count = result.length;
status = "Macro found " + count + " matches.";
//return result to caller:
return result.join("rn");
}else{
return "No match found.";
}
}_
StefanParticipant
I have searched for an good regex to match url.
An basic for an script could be://Text to parse for URL:
selText = document.selection.text;
//
//
//Show matched URLs:
vURLs = findUrls(selText);
alert(vURLs);
//
//
//Open matched URLs:
vURLs = findUrls(selText);
openUrls();
function findUrls(searchText){
// gruber revised expression - http://rodneyrehm.de/t/url-regex.html
var regex= /b((?:[a-z][w-]+:(?:/{1,3}|[a-z0-9\%])|wwwd{0,3}[.]|[a-z0-9.-]+[.][a-z]{2,4}/)(?:[^s()<>]+|(([^s()<>]+|(([^s()<>]+)))*))+(?:(([^s()<>]+|(([^s()<>]+)))*)|[^s`!()[]{};:'".,<>?«»“”‘’]))/ig;
result= searchText.match(regex);
if(result){return result.join("rn");}else{return false;}
}
function openUrls(vURLS){
var ie = new ActiveXObject("InternetExplorer.Application");
ie.Visible = true;
arr = vURLs.split("rn");
for(i=0,E=arr.length; i<E; i++){
vURL = arr[i];
ie.Navigate(vURL);
pause(1000);
if(i==3) quit(); // for debugging only
}
}
function pause(ms) {
ms += new Date().getTime();
while (new Date() < ms){}
}This will open every url in IE but in same tab. Use History back.
You may want to find a solution to open each url in a new tab.
You can utilize other browsers maybe by using a code like:
var wsh = new ActiveXObject(“WScript.Shell”);
wsh.run(“notepad.exe”, 1, True);StefanParticipantuser wrote:
is it possible to select multiple links and open all of them in default web browser with one click?You can not do more then one selection at once.
But you can use a script/macro to extract and collect all URLs
and then use something like (For Each URL in URLs Do “open browser”)StefanParticipantuser wrote:
count all the regex matches
I just want to have these options when I do a regex searchYou can check “[X] Count Matches” and click at [Find Next]
to see the count in the status bar.user wrote:
select all the regex matches
I just want to have these options when I do a regex searchYou can click at [Bookmark All]
and then utilize “Edit > Bookmarks”Or use a script/macro to collect all matches.
In the Library you can find e.g. “Macro to extract strings using regular expression”StefanParticipant
Toggle ALL marks at once (Space Tabs EOL EOF)Often i want to see more then one kind of mark (Space, Tab, Line ends, End of file)
and therefor i have to go three/four times to the menu “View > Marks”
to enable or disable only one mark kind at each visit.I had created an macro for this too
But I want to suggest to add an menu item
“View > Marks > Toggle Marks Visibility”StefanParticipant
Hi Yutaka,did you have found some time to look into this issue?
Can this feature become improved please?
Stefan wrote:
I would also like to be able
to move the zero-width vertical selection ( | )
with the left/right arrow keys
to modify several columns
without the need to do an selection again and again.StefanParticipant
This is still the same with EmEditor v12.0.11.Since Yutaka didn’t response on this
I do not know if is this an bug?If yes, can this be improved please?
If No, what would be the indicated workaround please?
Stefan wrote:
Hi Yutaka, i have an problem with replacing text
in an column/block selection from an macro.Tested with 11.0.5 and 11.1.7
My problem:
if i take the block selected text,
and manipulate it with an macro,
the macro works correct
but the text replacement in the document
replaces all selected lines
with the replacement of the first line only.StefanParticipant
Hi Yutaka, unfortunately I have seen no feedback from you about this issue.Don’t you think this would be a nifty enhancement?
- AuthorPosts