Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #5116
    jugaor
    Participant

    Hi, Yutaka.
    –I customized the Macros menus with several scripts to run in folders with text files (*.srt) without luck. They don’t work in b43, RC1 and RC2; neither in a previous beta (b40, I think); in b41 (confirmed) and 5.x versions they run fine. My usual method is: opening any file from the wanted folder and just run the script. I have always active the “Use Current Folder as Default to Find in FIles” option.
    BTW, my other “in place” scripts (working inside open files) are always right.

    –About our previous thread
    (http://www.emeditor.com/modules/newbb/viewtopic.php?viewmode=flat&topic_id=466&forum=3)
    please, please, make sure that the new unicode charset is also active within running scripts (your kind fix only works at manual searches & replaces by now).

    Thank you, and excuse my bad English ;)
    jugaor

    #5118
    Yutaka Emura
    Keymaster

    jugaor wrote:
    Hi, Yutaka.
    –I customized the Macros menus with several scripts to run in folders with text files (*.srt) without luck. They don’t work in b43, RC1 and RC2; neither in a previous beta (b40, I think); in b41 (confirmed) and 5.x versions they run fine. My usual method is: opening any file from the wanted folder and just run the script. I have always active the “Use Current Folder as Default to Find in FIles” option.
    BTW, my other “in place” scripts (working inside open files) are always right.

    –About our previous thread
    (http://www.emeditor.com/modules/newbb/viewtopic.php?viewmode=flat&topic_id=466&forum=3)
    please, please, make sure that the new unicode charset is also active within running scripts (your kind fix only works at manual searches & replaces by now).

    Thank you, and excuse my bad English ;)
    jugaor

    I couldn’t reproduce your problem The new unicode charset is certainly active both within manual search and running scripts. Please make sure your scripts include eeFindReplaceOnlyWord flag.

    #5146
    jugaor
    Participant

    –I think that I isolated the problem #1.
    When customizing the Macros menu, b41 doesn’t recognize the added macros until it’s restarted (if I immediately invoke them after customizing the menu, Em apparently ‘runs’ them but it only flickers a “Replacing” macro window, without touching the target text files. Closing and reopening Em is mandatory).
    But all the subsequent betas and RC never recognize them (even after restarting, they always show the flickering window) :-(
    I also tested the betas in a fresh XP install in MS Virtual PC (the official XP SP2 English from its site) with the same result.
    Please, make sure that the VBEE support is enabled in the new releases.

    –Confirmed: the new ISO codes are only working in manual Searches & Replaces, not in VBEE scripts (b41, since I can’t test them with the others). Please, let me write examples (with several fake Spanish words, only for testing):

    editor.ReplaceInFiles “ó”, “o”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”
    editor.ReplaceInFiles “Ó”, “O”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”

    ORIGINAL: Ó ó Óñonoy Ñóño diseñó diseüó.
    FINAL: O o Oñonoy Ñoño diseño diseüo.

    editor.ReplaceInFiles “a por”, “por”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”
    editor.ReplaceInFiles “A por”, “Por”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”

    ORIGINAL: A por, a por. Cabaña por ahí. CÜA por eso. A poría.
    FINAL: Por, por. Cabañpor ahí. CÜPor eso. Poría.

    editor.ReplaceInFiles “asi”, “así”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”
    editor.ReplaceInFiles “Asi”, “Así”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”

    ORIGINAL: Asi, asi. Asiático, Ñasi, Éasi.
    FINAL: Así, así. Asíático, Ñasí, Éasí.

    editor.ReplaceInFiles “comun”, “común”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”
    editor.ReplaceInFiles “Comun”, “Común”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”

    ORIGINAL: Comun, comun. Comunícate, nécomun.
    FINAL: Común, común. Comúnícate, nécomún.

    I also tried to change “eeEncodingSystemDefault” to others without luck (several ones don’t make replaces, “EncodingUTF8” erases not replaces).
    Besides this, changing the last ones:

    editor.ReplaceInFiles “(A|a)si”, “1sí”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceRegExp Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”
    editor.ReplaceInFiles “(C|c)omun”, “1omún”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceRegExp Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”

    ORIGINAL: Asi, asi. Asiático, Ñasi, Éasi. Comun, comun. Comunícate, nécomun.
    FINAL: Así, así. Asiático, Ñasi, Éasi. Común, común. Comunícate, nécomun.

    The expected behavior! :-o Very strange! (but this ‘solution’ isn’t applicable to other chases, as the first two ones).

    Excuse me the long post, but I tried to be the clearer possible. I hope that you can test these issues and make the excellent Em even better! :-)
    jugaor

    #5147
    Yutaka Emura
    Keymaster

    jugaor wrote:
    –I think that I isolated the problem #1.
    When customizing the Macros menu, b41 doesn’t recognize the added macros until it’s restarted (if I immediately invoke them after customizing the menu, Em apparently ‘runs’ them but it only flickers a “Replacing” macro window, without touching the target text files. Closing and reopening Em is mandatory).
    But all the subsequent betas and RC never recognize them (even after restarting, they always show the flickering window) :-(
    I also tested the betas in a fresh XP install in MS Virtual PC (the official XP SP2 English from its site) with the same result.
    Please, make sure that the VBEE support is enabled in the new releases.

    –Confirmed: the new ISO codes are only working in manual Searches & Replaces, not in VBEE scripts (b41, since I can’t test them with the others). Please, let me write examples (with several fake Spanish words, only for testing):

    editor.ReplaceInFiles “ó”, “o”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”
    editor.ReplaceInFiles “Ó”, “O”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”

    ORIGINAL: Ó ó Óñonoy Ñóño diseñó diseüó.
    FINAL: O o Oñonoy Ñoño diseño diseüo.

    editor.ReplaceInFiles “a por”, “por”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”
    editor.ReplaceInFiles “A por”, “Por”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”

    ORIGINAL: A por, a por. Cabaña por ahí. CÜA por eso. A poría.
    FINAL: Por, por. Cabañpor ahí. CÜPor eso. Poría.

    editor.ReplaceInFiles “asi”, “así”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”
    editor.ReplaceInFiles “Asi”, “Así”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”

    ORIGINAL: Asi, asi. Asiático, Ñasi, Éasi.
    FINAL: Así, así. Asíático, Ñasí, Éasí.

    editor.ReplaceInFiles “comun”, “común”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”
    editor.ReplaceInFiles “Comun”, “Común”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”

    ORIGINAL: Comun, comun. Comunícate, nécomun.
    FINAL: Común, común. Comúnícate, nécomún.

    I also tried to change “eeEncodingSystemDefault” to others without luck (several ones don’t make replaces, “EncodingUTF8” erases not replaces).
    Besides this, changing the last ones:

    editor.ReplaceInFiles “(A|a)si”, “1sí”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceRegExp Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”
    editor.ReplaceInFiles “(C|c)omun”, “1omún”, “*.txt”, eeFindReplaceOnlyWord Or eeFindReplaceRegExp Or eeFindReplaceCase, eeEncodingSystemDefault, “”, “”

    ORIGINAL: Asi, asi. Asiático, Ñasi, Éasi. Comun, comun. Comunícate, nécomun.
    FINAL: Así, así. Asiático, Ñasi, Éasi. Común, común. Comunícate, nécomun.

    The expected behavior! :-o Very strange! (but this ‘solution’ isn’t applicable to other chases, as the first two ones).

    Excuse me the long post, but I tried to be the clearer possible. I hope that you can test these issues and make the excellent Em even better! :-)
    jugaor

    What encodings are the original files were saved as? Are you sure these are saved as System Default Encoding?

    Try

    eeOpenDetectUnicode Or eeOpenDetectUTF8

    in addition to eeFindReplaceOnlyWord Or eeFindReplaceCase in the nFlags parameter. This way should more resemble manual Replace in Files dialog box.

    #5148
    jugaor
    Participant

    The files are ANSI (Western European), the same as System Default Encoding (I use Spanish Windows XP, but my tests were also in the English version).
    I need to work with subtitles (*.srt), many downloaded from Internet or directly generated by me. For testing purposes, I changed their extension to .txt, with the same result.

    I tried your suggestion (thanks!) but it only correctly works if I first re-save ALL the files as UTF-8.
    Sadly, it isn’t a chance for me, because the subtitler applications don’t recognize the Unicode special chars (with or without BOM signature: they only read ANSI). And saving & re-saving are impossible with the bunch of files of my daily job :-(

    If you can to find a way to recognize the ANSI special chars too, PLEASE PLEASE, write me!

    TIA;
    jugaor

    #5149
    jugaor
    Participant

    BTW, my friend, what about Problem # 1?
    I’m tied with 7b41 by now…

    Thanks you very much for your patience!
    jugaor

    #5152
    Yutaka Emura
    Keymaster

    What is Problem #1?

    If you believe this was a bug of EmEditor, please send me a simple test case so I can reproduce the problem. Please make it as small as possible yet enough to reproduce the issue. If it is a macro, please send me the macro (please make it small and clear) after zipped with a small sample text if necessary. Thanks! My email is [email protected]

    #5156
    jugaor
    Participant

    “The Problem # 1” is that Em7 isn’t running certain VBscripts for me. But I found the responsible: the tiny emedshl.dll.

    All the details at your mail.
    jugaor

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.