- AuthorPosts
- November 27, 2006 at 8:20 pm #4032pixelchuteMember
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!
November 27, 2006 at 8:22 pm #4033pixelchuteMembershastafir, 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 clickAugust 29, 2007 at 7:29 pm #4606pixelchuteMemberAah, I found it!!
I love being able to add Macros into the context menu :)
- AuthorPosts
- You must be logged in to reply to this topic.