Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4032
    pixelchute
    Member

    Have you ever been right in the middle of coding and wanted an official PHP function definition, etc? What about wanting to Goooooogle for a phrase right inside your source?

    These JavaScript macros should cover it ;)

    php.net function definition


    // Create windows scripting host shell object
    var oShell = new ActiveXObject( "WScript.Shell" );

    // Grab the selection and escape for URL
    search = escape( document.selection.text );

    if( search != '' )
    // Search for it!
    oShell.Run('http://www.php.net/search.php?show=quickref&pattern='+search);
    else alert( 'Please make a selection!' );

    In-line google search


    // Create windows scripting host shell object
    var oShell = new ActiveXObject( "WScript.Shell" );

    // Grab the selection and escape for URL
    search = escape( document.selection.text );

    if( search != '' )
    // Search for it!
    oShell.Run(''http://www.google.com/search?hl=en&btnG=Google+Search&q='+search);
    else alert( 'Please make a selection!' );

    Simply highlight your text, and run the Macro!

    #4033
    pixelchute
    Member

    shastafir, on the old forums, also provided a great way to Execute a macro via the context-menu (right-clicking…)

    Assuming you have EE version 6+:
    * Click menu Tools > Customize Menus…
    * Select “Context Menu” in the “Menu to Customize” list
    * Select the desired location and click “Insert Above/Below/Right”
    * In the Menu Properties dialog select “My Macros” in the Category list
    * Select the desired macro in the “Commands” list
    * Note: Unfortunately you cannot change the name of the command to something other than the macro name. (Yutaka, this could be considered a improvement request;) )
    * Click OK a few times and test the right click

    #4606
    pixelchute
    Member

    Aah, I found it!!

    I love being able to add Macros into the context menu :)

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