Viewing 1 post (of 1 total)
  • Author
    Posts
  • #5665

    Yutaka Emura
    Keymaster

    dexplore.jsee (JavaScript for EmEditor)


    // Displays keyword at cursor with Microsoft Document Explorer 2008 (shipped with Visual Studio 2008 or MSDN)
    // It will become extremely useful if you assign this macro to the F1 key
    // in C++ (or your choice) configuration properties in EmEditor.
    //
    function Link( sKeyword )
    {
    // Run Document Explorer or activate if already running.
    var viewer = GetObject( "", "DExplore.AppObj.9.0" ); // ".9.0" in case of Visual Studio 2008. Change this number to another version if needed.
    var helpHost = viewer.Help;
    helpHost.SetCollection("ms-help://ms.vscc.v90", "(unfiltered)"); // the first parameter specifies the collection, the second parameter specifies the filter (can be "Visual C++", etc.).
    try {
    helpHost.DisplayTopicFromF1Keyword( sKeyword );
    helpHost.SyncIndex( sKeyword, 1 );
    }
    catch (e) { }
    }

    var sKeyword;
    if( document.selection.IsEmpty ){ // select word if none selected
    x = document.selection.GetActivePointX( eePosLogical );
    y = document.selection.GetActivePointY( eePosLogical );
    document.selection.SelectWord();
    sKeyword = document.selection.Text;
    document.selection.SetActivePoint( eePosLogical, x, y );
    }
    else {
    sKeyword = document.selection.Text; // used currently selected text if already selected
    }
    Link( sKeyword );
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Share with friends... Tweet about this on TwitterShare on FacebookShare on Google+Email this to someone