Forum Replies Created

Viewing 25 posts - 3,126 through 3,150 (of 3,693 total)
  • Author
    Posts
  • in reply to: Deleting a file #5692
    Yutaka Emura
    Keymaster

    PaperPlate wrote:
    This is actually part of a larger “project” to addon on to the FindAll.jsee in the macro section (mighty nice little macro). What I’m trying to do is after doing a FindAll allowing editing of the new file instance.

    So if you were to do a find all on “if” for example, yo would see every line with an “if” in it. Then the user could edit that new tabbed file and run another macro to drop the changes they made back in. So if you only edited one line, say line 200, it would compare, then dump that new line in since it was a change.

    The only way I see to do this in EmEditor (I only started working with EmEditor macros this week*) is to save the file generated by the FindAll macro, then compare that file, using the tags as references) to the original file. But I would want to delete that saved file after so as not to clutter the current directory.

    Another possibility would be to just save to a dump “log” folder and use that as your point of reference, and then not worry about deleting.

    So is this possible at all? Could I create a macro to run on the FindAll (after its saved since I’m pretty sure you couldn’t run on the non saved file since its not saved, or could you?).

    *EmEditor is a great tool, thank you for it!

    I am not exactly sure what you would like to do, but does FindAll.jsee mean FindAll.vbee at http://www.emeditor.com/modules/mydownloads/singlefile.php?cid=8&lid=172 ?

    You might also want to try “Replace in Files” feature of EmEditor (on the Search menu). You can also try “Search” plug-in of EmEditor.

    in reply to: Insert Table in HTML #5689
    Yutaka Emura
    Keymaster

    bennett wrote:
    I’m very new to EmEditor and HTML! Using EmEditor Pro 7.00.04. When I insert a new table I get:

    Would it be possible to produce the following everytime I want to insert a new table:

    I’m using EmEditor to update a web site. Without the

    between

    and

    the table simply disappears!

    There might be some customisable setting that will enable me to do the above.

    Many thanks.

    bennett

    I assume you are talking about HTMLBar plug-in. You are right, the Table button is not customizable. Most other buttons are customizable from the HTMLBar plug-in Properties > Customize Buttons button. If you know how many rows and columns of table you usually create, you can select “Inser Tags” when you customize the button and insert those tags you need. Or you might want to try a macro. I might consider the ability to change table details in the plug-in in the future.

    Yutaka Emura
    Keymaster

    jonhutch24 wrote:
    Ok what I would REALLY like is tab stops in the snippets. That’s my request! :)

    I am not sure what you want. You can use t as a tab character.

    in reply to: Please make deployment of macros easier! #5685
    Yutaka Emura
    Keymaster

    owilsky wrote:
    I cannot tell my users to install 30 macros by hand and configure 20 keyboard shortcuts for them and create their own menus.
    If it cannot be done automatically, I will try to find out how to change the reg value. Can you tell me how the general format is? I only need the format for the macros, I do not need the “normal” menu commands.
    I guess there must be 3 parts per macro:
    – path and filename of macro
    – keyboard shortcut
    – as you said the length of the entry.
    – plus maybe a separator between different entries?

    It may be difficult but I know I can do it!

    Oliver

    Here is the source code for writing a menu to the registry. I know you will have a lot of questions, but I hope you can figure them out. Ignore T2E and CV_ACP.


    BOOL SaveMenuItem( CMenuArray& MenuArray, int nMenuKind, bool bDelete )
    {
    HKEY hKey = GetCommonRootKey();
    if( hKey == NULL ) return FALSE;
    BOOL bSuccess = FALSE;
    if( bDelete ){
    MyRegDeleteValue( hKey, aszMenu[nMenuKind] );
    bSuccess = TRUE;
    }
    else {
    int nLen;
    DWORD dwCount = sizeof( int );
    dwCount += sizeof(DWORD);
    CMenuArray::iterator it = MenuArray.begin();
    int nMax = 0;
    while( it != MenuArray.end() ){
    CV_ACP;
    dwCount += (DWORD)wcslen( T2E( it->m_szName ) ) * sizeof(WCHAR);
    dwCount += (DWORD)wcslen( T2E( it->m_szFile ) ) * sizeof(WCHAR);
    dwCount += sizeof( int ) + sizeof( UINT ) + sizeof( int ) + sizeof( int );
    nMax++;
    it++;
    }
    char* pBuf = new char[dwCount];
    if( pBuf != NULL ){
    char* p = pBuf;
    *((DWORD*)p) = SIGNATURE_MENU_LIST_2;
    p += sizeof( DWORD );
    *((int*)p) = nMax;
    p += sizeof( int );
    it = MenuArray.begin();
    while( it != MenuArray.end() ){
    *((UINT*)p) = it->m_nID;
    p += sizeof(UINT);
    *p = (char)it->m_nDepth;
    p += sizeof(UINT);
    CV_ACP;
    LPWSTR szE = T2E( it->m_szName );
    nLen = (int)wcslen( szE );
    *((int*)p) = nLen;
    p += sizeof( int );
    memcpy( p, szE, nLen * sizeof(WCHAR) );
    p += nLen * sizeof(WCHAR);

    szE = T2E( it->m_szFile );
    nLen = (int)wcslen( szE );
    *((int*)p) = nLen;
    p += sizeof( int );
    memcpy( p, szE, nLen * sizeof(WCHAR) );
    p += nLen * sizeof(WCHAR);

    it++;
    }
    ASSERT( p == pBuf + dwCount );
    bSuccess = ( p == pBuf + dwCount );
    WriteProfileBinaryReg( hKey, aszMenu[nMenuKind], (LPBYTE)pBuf, dwCount );
    delete [] pBuf;
    }
    }
    MyRegCloseKey( hKey );
    return bSuccess;
    }

    P.S. How about creating a popup menu using PopupMenu object in the macro?
    http://www.emeditor.com/help/macro/popupmenu/index.htm

    in reply to: Please make deployment of macros easier! #5683
    Yutaka Emura
    Keymaster

    owilsky wrote:
    OK, I managed to import all keyboard shortcuts by macro. No problem, thanks for that.

    BUT: Next problem: :-(
    In HKEY_CURRENT_USERSoftwareEmSoftEmEditor v3CommonMainMenu my changed main menu including some macros is saved, again with macro paths hard coded. :-x
    I guess it’s not possible to change the main menu per macro?

    I tried to decode the main menu entry, seems to be unicode, always ansi code in hex and then “00”.
    I tried to replace my old path with the new one in this hex field and that seemed to work great, but now I get a crash at offset 0003afb1 when I start EmEditor.
    Guess it’s not that easy :-(

    a. Is it possible to change the main menu per macro?
    b. If not, what’s the format of the MainMenu registry entry?

    Thanks for any info.
    Oliver

    You cannot change the macro path from the Registry. The Registry format also includes the length of each menu or command path, so it is not easy to change the Registry value. You should use the “Tools” > “Customize Menus” to change each menu item.

    in reply to: Please make deployment of macros easier! #5681
    Yutaka Emura
    Keymaster

    owilsky wrote:
    [But the ini file is saved in EmEditor’s folder in Program Files, right? And a normal user does not have the right to write into that folder, so he cannot save his settings into the ini file.

    That is true. I was assuming you might want to install EmEditor to an unrestricted folder.

    in reply to: More elegant handling of word wrap #5678
    Yutaka Emura
    Keymaster

    DavidA wrote:
    I’ve been a user of EmEditor for a while now and there’s always been one thing that niggles me – the way word wrap is implemented with indented text.

    I really like to keep all my notes as .txt files, which means a certain amount of indenting takes place so that I can distingush sections. The problem is that EmEditor doesn’t handle word wrap particularly well on these indented section and, instead of the second sentence beginning below the first line (as in Word), it starts at the beginning of the next line:

    e.g.

    In Emeditor:
    _______Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text

    Better:
    ____Text Text Text Text Text Text Text Text Text Text Text Text Text Text
    ____Text Text Text Text Text Text Text Text Text Text Text Text Text Text

    (The underscores are meant to be a tab / blank space)

    I realise that EmEditor is a text editor, rather than a word processor, but other editors (e.g. TextPad) handle word wrapping much more elegantly.

    Any chance of this in EmEditor?

    Thanks,

    David

    I believe this can be set by checking the “Wrap Indent” checkbox in the Tab/Indent dialog box (Configuration Properties > General tab > Tab/Indent button).

    in reply to: Please make deployment of macros easier! #5677
    Yutaka Emura
    Keymaster

    owilsky wrote:
    Hi,

    This one is both a cry for help as well as a feature request:

    I created some kind of IDE out of EmEditor for our company.
    Therefor I created a lot of macros.
    Unfortunately because of the way EmEditor stores its configuration it is very difficult to deploy and update the macros on all machines:

    – First I install EmEditor
    – Then I import a .reg file containing the config that everybody should use
    – Then the problems begins: Our macros are stored in C:Documents and Settings[username]Application DataMy Macros.
    So you see: Every user has another folder where the macros are saved. So I wrote a tool to change the paths in “HKEY_CURRENT_USERSoftwareEmSoftEmEditor v3Macros”.
    Then I saw that the keyboard shortcuts are saved in a binary field in HKEY_CURRENT_USERSoftwareEmSoftEmEditor v3Config[Config Name]PIKM and that this binary field contains the absolute path in binary form —> arghhh!!!

    Is there an easier way to do this? (User PCs don’t have admin rights for working, so I prefer saving macros in profile folders because they are updated quite often)
    And please consider an easier way to store the configuration in upcoming versions.

    Thanks for any help,
    Oliver

    One option is use INI file settings, which use relative path, but if My Macro folder is under user profile (sucn as UsersJohnDocuments…), you will still have to fix each relative path.

    Another option is to use a macro, but this too can take some time. Just in case you want to try this option, I wrote the sample macro to start with:



    bAllConfigs = confirm( "Do you want to set keyboard in ALL configurations? Click Cancel if you want to set keyboard only in the current configuration." );

    if( bAllConfigs ){
    cfgs = new Enumerator( editor.Configs );
    for( ; !cfgs.atEnd(); cfgs.moveNext() ){
    cfg = cfgs.item();
    SetKeys( cfg );
    }
    }
    else {
    cfg = document.Config;
    SetKeys( cfg );
    }
    alert( "Keyboard set successfully!" );

    function SetKeys( cfg )
    {
    lst = cfg.Keyboard.List;
    // nKey is a virtual key for the shortcut.
    // nFlags is a combination of eeVirtualKey, eeShift, eeCtrl, and eeAlt. See the Macro Reference.
    // nCmd is the command ID for the macro (9216 through 9216 + 1023). You can use editor.QueryStringByID method to find the exact command ID.
    lst.Add( nKey, nFlags, nCmd );
    cfg.Save();
    }

    For the next major version, I will try to find a way to transfer the settings, possibly by adding something like \%MYMACRO_PATH\% environment, which can be included in the macro path, so the shortcut settings will be easily transferred to another PC.

    in reply to: Close main window by pressing ESC #5673
    Yutaka Emura
    Keymaster

    ujr wrote:
    Ah – yes! Thanks!
    I’ve assigned ESC to “Close All” which does what I want. Great!

    Nevertheless I would have expected a command “Exit All” or “Exit”, just like it appears on the file menu (I hope I haven’t overlooked it – I *did* double check). It’s probably not so important – but is there a difference between “Close All” and “Exit All”?

    “Close All” and “Exit All” are exactly the same.

    in reply to: Problem with Outline Text #5668
    Yutaka Emura
    Keymaster

    nut99 wrote:
    The “Outline Text” plugin can not show correctly such C functions written like the following style:

    void OnEvents(
    HWND hwndView,
    UINT nEvent,
    LPARAM lParam )
    {

    }

    It is outlined as “LPARAM lParam )”, not “void OnEvents( HWND hwndView, UINT nEvent, LPARAM lParam )
    “.

    In addition, can the plugin only show the sorted function name without input parameters and return value? It seems that the manner of ultraedit is clearer.

    I am working on that plug-in for improvements.

    If you would like, you can download FunctionList plug-in at
    http://jp.emeditor.com/modules/mydownloads/singlefile.php?cid=26&lid=222, but sorry for Japanese. Just make sure you specify the full path to ctags.exe in the first text box in the plug-in Properties.

    Yutaka Emura
    Keymaster

    johnadams wrote:
    As per the subject.
    Is there a way to retain Syntax Highligting and Font Formatting on Copy and Paste into MS Word 2007?

    You can use this plug-in:
    http://www.emeditor.com/modules/mydownloads/singlefile.php?cid=8&lid=190
    and open that HTML with Word.

    in reply to: Find in files matching random binary files #5666
    Yutaka Emura
    Keymaster

    bobince wrote:
    Curious error this. Am trying out Pro 7.00.4; never noticed this with previous bought versions but I don’t know the exact version when the behaviour might have been introduced.

    When doing a Find-in-files – with or without escape sequences, but no regexps – EmEditor finds many spurious matches of the search string (regardless of what it is) at random points in binary files such as images. Regexp search, on the other hand, is fine.

    Any ideas?

    I don’t know what the problem is, but you might want to check the opening Encoding. If you believe this is a bug of EmEditor, please send me the sample file (after zipped) I can reproduce this issue with the detail procedure at [email protected] . Thanks!

    in reply to: Exit All by ExecuteCommandByID #5654
    Yutaka Emura
    Keymaster

    owilsky wrote:
    Hi,

    is it possible to do a “File/Exit All” in a macro with ExecuteCommandByID? I didn’t find anything about it in the docs…

    If it is not possible, is there any other way to do this?
    I do not want to close the open files! I have set EmEditor to reopen the tabs when EmEditor restarts. I just want to exit EmEditor completely. “File/ Exit All” does exactly what I want, but I have to do that in a macro.

    Thanks,
    Oliver

    “Exit All” is the same as “Close All”. You can use
    editor.ExecuteCommandByID (4119);

    in reply to: Buy EmEditor V4 #5652
    Yutaka Emura
    Keymaster

    usieber wrote:
    I was happy for years with the EmEditor Free V1 but now I would like to use the multiple search highlighting available since V4.

    But I hate the new white icon, I want the old ‘brown book’ icon which I saw now for ten years.
    I was able to change the icon back in V4 by means of a ressource editor but I failed with all newer version.

    So I would like to by EmEditor V4 licences. Is this possible?

    Regards,

    Uwe Sieber

    I would be happy to see if you buy new licenses. I am not sure why you cannot change icons in newer versions, but maybe because new executable files are digitally signed. You can still buy Version 4 licenses. In fact, no version designation is necessary when you buy licenses. Just make sure to buy whether you want to buy Professional or Standard. You can use the same registration keys for all versions (4, 5, 6, and 7) as long as the edition (Pro or Standard) is the same (except for cracked or illegal keys). However, I would really recommend you to use the latest version of EmEditor even if you don’t like the icons. For shortcut icons, I believe you can change icons from the Shortcut Properties without using resource editors.

    in reply to: Next version of Emeditor #5650
    Yutaka Emura
    Keymaster

    gan wrote:
    I read in another thread that a new release of emeditor is being developed as we speak and that we can expect a hex editor in the new version. Is there any information what we can expect of new features in the next release?
    I made some requests and i have seen requests from other as well and would be nice to know if i can expect these feature in the next version of emeditor.

    Thanks in advance

    I don’t want to comment on any features except binary editing because I don’t want to make any promises. You will find what the features are when the next major beta version becomes available.

    in reply to: Voting for Hex Editor #5648
    Yutaka Emura
    Keymaster

    owilsky wrote:
    +1 from me :-D

    Binary/Hex editing will be one of features in next version. It is already working now.

    in reply to: Tab close buttons #5643
    Yutaka Emura
    Keymaster

    JernejL wrote:
    When i upgraded to a newer version a while ago (it was still version 6, and i have not yet tested version 7), there were close buttons on each tab, how do i get the close button to be just a single close button and not multiple close buttons, like in 6.04?

    Right-click on tabs, select Customize Tabs from the context menu, click Mouse Options, and select “Right Side of Window” in the Close Button drop-down list. I know this is hard to find, and I might move this to another place in the future.

    in reply to: Strongly recommended Function requirement suggestion #5642
    Yutaka Emura
    Keymaster

    chabulier wrote:
    Oh, it works now.
    So we need manually run this macro for using this function? Is there any other config settings that Emeditor can automatically detected this just like a normal link?

    Thanks a lot, Yutaka.

    Since highlighting tags can slower the overall speed of EmEditor and since most people do not need to highlight tags, it will not be turned on automatically. However, you can make it on always by selecting Customize on the Macros menu, select the above macro in the My Macros list, check Runs at Events, click Events button, and then click “File Opened” in the Select Events list.

    in reply to: Strongly recommended Function requirement suggestion #5639
    Yutaka Emura
    Keymaster

    chabulier wrote:

    document.HighlightTag = true;

    When I open a saved search results and run this macro, nothing was changed. The Link still not works.

    My original suggestion was that we can save the searching results(Find in Files) as original format. That means next time we open this file, we still can click on the link and point to that file’s position.

    Such like when we click on this link C:temp.txt:4621 Emeditor will open that file and located to line:4621.

    This should be a pretty useful function, pls advise. :-)

    I didn’t have any problems with this macro. When you run this macro, make sure the search result text is the active document.

    in reply to: Syntax highlight multi-line sections other than comments #5637
    Yutaka Emura
    Keymaster

    Deipotent wrote:
    I code in C/C++ and would like to be able to colour all text light grey between “#if 0” and matching “#endif”, as well as “#if (0)” and “#endif”, so as to visually indicate whi code will be compiled out.

    Is this possible ?

    It is not possible currently. I might consider this feature in future versions.

    in reply to: file change detection vs tabs #5634
    Yutaka Emura
    Keymaster

    ujr wrote:
    Hi,
    maybe you could change the following behaviour:
    Let’s suppose I have two files file1.txt and file2.txt. file2.txt is selected and displayed. Meanwhile I’m working with another program that changes both files somehow.
    Now when I return to EmEditor, it will prompt immediately that file2.txt has been changed and whether I want to reload it.
    However, when I select file1.txt, it will take some time (approximately the 5 sec that are set in the configuration for monitoring interval) until the file change is recognized. Wouldn’t it be better, to scan *all* files for changes when EmEditor becomes active? You wouldn’t need to ask for reload until the file is selected.
    Regards

    So exactly how do you want to see EmEditor display the message box? Do you want to see all “file1.txt”, “file2.txt” and “file2.txt” are changed, but you want the prompt to ask the active document “file2.txt” to reload?

    in reply to: Syntax Highlighting: How to match this? #5630
    Yutaka Emura
    Keymaster

    owilsky wrote:
    I want the text between two commands/tags to be highlighted.

    I want to highlight everything between two *FONT commands excluding the commands.

    Example: *FONT 3text*FONT 0
    here only “text” should be highlighted. The numbers 3 and 0 could be any number.

    I tried this with lookbehind and lookahead:

    (?<=*FONT ?d+).*?(?=*FONT ?d+)

    Unfortunately lookbehind does not allow a regex but only text, so “(?<=*FONT ?d+)" does not work.

    Any ideas how this could be achived?

    Thanks!

    Unfortunately, the regular expression engine does not support variable length of lookbehind and lookahead. You will need to have the expression fixed length in lookbehind and lookahead can be matched.

    Yutaka Emura
    Keymaster

    Deipotent wrote:
    Currently the matching brackets are boldened and with small fonts the matching bracket doesn’t always stand-out clearly. Would it be possible to configure the foreground and background colour for matching brackets, so I could for example set the foreground to red and background of matching brackets set to bright green or some other colours. This would make it much easier to see matching brackets when working with small fonts.

    You can customize the color and style of matching brackets to whatever you would like from the Display tab of Configuration Properties. Select “Matched parentheses/brackets” from the Specify Part list in the Display tab.

    in reply to: Activate Next Group macro #5623
    Yutaka Emura
    Keymaster

    If you have more than two groups, you might need this macro to jump to another group.


    wnds = shell.windows;
    nMax = wnds.Count;
    for( i = nMax; i > 0; i-- ){
    wnd = wnds.Item( i );
    if( wnd && wnd.className == "EmEditorMainFrame3" ){
    wnd.SetForeground();
    break;
    }
    }

    in reply to: WordCount always disabled. #5621
    Yutaka Emura
    Keymaster

    DenisCool wrote:
    Thank you! Now works :)
    I think will be a more usefull for user to count all words in document if nothing is selected.

    I will update the plug-in in future versions with enhancements. Thanks!

Viewing 25 posts - 3,126 through 3,150 (of 3,693 total)