Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Javascript problem in portable version (8.05). #7269
    Mike
    Member

    No virus or other extra security layer.
    My vista might need a reinstall though.
    I can reproduce it now with the none portable version installed.
    The portable tries to find the EEMacro.tlb file through the registry first.
    And if that failes it cant run the .js file, even if it load the macro file from the portables directory.
    If I rename the key below it failes to run the script.
    HKEY_CLASSES_ROOTTypeLib{EEC66535-61A2-43A8-B34F-7A2863014D5E}
    And the data is in “/1.0/0/win32” = “C:Program FilesEmEditorEEMacro.tlb”

    in reply to: How to switch editor tab in linear order? #7264
    Mike
    Member

    Duh, ok I have made my first javascript, :-( , to solve it.
    But I still would not mind if this was a “native” option.

    // Move to right
    var docs = new Enumerator(editor.Documents);
    var current = editor.ActiveDocument;
    var first = null;
    var doc = null;

    for(; !docs.atEnd(); docs.moveNext() ){
    doc = docs.item();
    if (first == null) first = doc;

    if (doc == current) {
    docs.moveNext();
    doc = docs.item();
    if (doc == null) doc = first;
    break;
    }
    }
    if (doc != null) doc.Activate();

    // Move to left
    var docs = new Enumerator(editor.Documents);
    var current = editor.ActiveDocument;
    var last = null;
    var doc = null;
    for(; !docs.atEnd(); docs.moveNext() ){
    doc = docs.item();
    if (doc == current && last != null) break;
    last = doc;
    }
    if (last != null) last.Activate();

Viewing 2 posts - 1 through 2 (of 2 total)