locked
Shortcuts to bookmarklets RRS feed

  • Question

  • It is possible to assign a keyboard shortcut to any favorite via properties in the right-click menu. However if the favorite is actually a bookmarklet (a piece of javascript) then the shortcut doesn't work. Being able to have shortcuts for my daily favorites (especially the ones on my favorites bar) is extremely handy.

    Does anyone know how to make this work?

    Thanks!

    Sunday, February 19, 2012 10:03 PM

Answers

  • As a workaround (yes, I'm a keyboard junky) there are ways to accomplish the same, but you can hardly call these keyboard shortcuts ;)

    That's what I meant.  What keyboard and software do you have?   E.g.  with Microsoft IntelliType there is a keyboard macro facility, so you could easily assign a complex sequence of keystrokes to one unused key.   It would be simpler than scripting with SendKeys().   OTOH  clicking that button is even simpler.   <eg>


    Good luck

    Robert
    ---

    • Marked as answer by moorpipe Tuesday, February 21, 2012 2:26 AM
    Monday, February 20, 2012 6:12 AM

All replies

  • However if the favorite is actually a bookmarklet (a piece of javascript) then the shortcut doesn't work.

    I hadn't noticed the feature but I just assigned a keystroke to a button which I use to move and resize a window and saw the intended action flash as if it knew how to do what was wanted but then fade and stay the same as it was originally.   No, a more accurate description would be that it is flashing as if it was first creating a new cascaded window (e.g. same size and shape offset from the original), then that fades.   So no sign that it is trying to actually execute the script.

    I think this makes sense because there is nothing about the keystroke which ties it to an existing window, just to the  .URL  file.

    Perhaps you will have to devise some other kind of automation solution instead?  E.g. assign a script to an unused function key which can simulate clicking that button?   (Beyond my scripting skills. <w>)


    Good luck

    Robert Aldwinckle
    ---

    And now I have had a look at my second monitor and see  View Downloads  has been opened, (perhaps because I chose Ctrl+Alt+J for my shortcut) with a "download request" for my script for each time I tried using it.   Same thing when assigned to K.  Bizarre!


    ---

    Sunday, February 19, 2012 11:56 PM
  • And now I have had a look at my second monitor and see  View Downloads  has been opened, (perhaps because I chose Ctrl+Alt+J for my shortcut) with a "download request" for my script for each time I tried using it.   Same thing when assigned to K.  Bizarre!

    That happened to me too! I should have warned you for that, sorry for that.
    As a workaround (yes, I'm a keyboard junky) there are ways to accomplish the same, but you can hardly call these keyboard shortcuts ;)
    1. (if favorites bar is visible) position your cursor to one of the upper bars (e.g. address bar) and tab your way to the first button. Then move with the arrow keys to the desired bookmarklet button. (If it's the first one you're lucky :)
    2. Via the Favorites menu. Open the menu (Alt+C or Ctrl+I) and use first letter positioning and/or arrow keys to jump to the desired bookmarklet.
    I guess if no one else has a an idea for a real shortcut, then it's back to the scripting board I'm afraid.

    Monday, February 20, 2012 12:36 AM
  • As a workaround (yes, I'm a keyboard junky) there are ways to accomplish the same, but you can hardly call these keyboard shortcuts ;)

    That's what I meant.  What keyboard and software do you have?   E.g.  with Microsoft IntelliType there is a keyboard macro facility, so you could easily assign a complex sequence of keystrokes to one unused key.   It would be simpler than scripting with SendKeys().   OTOH  clicking that button is even simpler.   <eg>


    Good luck

    Robert
    ---

    • Marked as answer by moorpipe Tuesday, February 21, 2012 2:26 AM
    Monday, February 20, 2012 6:12 AM
  • I got my shortcut thanks to my lifesaver macro tool Quick Macros (others like AutoHotkey mght work as well). Still I'm a bit disappointed you cannot use the facility IE offers. If MS doesn't want to tie a bookmarklet to a keystroke, e.g. for security reasons, that's fine, but then they shouldn't make the option available giving the impression it works. I think we can close this discussion. Thanks for your help. I appreciate.
    Monday, February 20, 2012 4:08 PM
  • try,

    Tools>Internet Options>Advanced tab, check "Enable Active content to run in files in My Computer"

    Reboot your computer for the full changes to take effect.


    Rob^_^

    • Proposed as answer by opt-out Tuesday, May 14, 2013 4:31 AM
    Monday, May 13, 2013 6:00 AM
  • For bookmarklet shortcuts the "View Downloads" pops up. So checking that option doesn't fix the problem.
    Monday, May 13, 2013 11:58 PM
  • Hi @moorpipe,

    please post your bookmarklet script.

    this forum is for questions about html, css and scripting for website developers using MSIE browsers.

    If view downloads is showing up it must be using document.location... shortcuts on the desktop using the javascript protocol are mapped to the My Computer zone in IE10.


    Rob^_^

    Tuesday, May 14, 2013 12:18 AM
  • @ Rob

    Now might be a good time for you to explain your solution for this when it was raised earlier:   <eg>

    http://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/making-an-ie-shortcut-to-open-a-specific-window/6c3dc8c7-5753-4a6f-bdfc-35e834f18836?page=2&msgId=39036432-afd0-4e69-acc7-1c279b401726

     

    TIA

     
    Robert
    ---

    Tuesday, May 14, 2013 3:42 AM
  • @Robert,

    that's for a vbscript.

    here is a bookmarklet from a .url file...

    url=javascript:function loadScript(scriptURL) { var scriptElem = document.createElement('SCRIPT'); scriptElem.setAttribute('language', 'JavaScript'); scriptElem.setAttribute('src', scriptURL); document.body.appendChild(scriptElem);}loadScript('http://westciv.com/tools/manifestR/manifestR.js');

    as there is no IE frame context from the desktop, window and document don't exist.

    Rob^_^

    Tuesday, May 14, 2013 5:55 AM
  • as there is no IE frame context from the desktop, window and document don't exist.

    It used to.   In any case in both of our examples it would because we only want to use the Favorites Bar button to do this with.

    So, I can use your example in a Developer Tools Console Command line but not in the Address bar?   That's different from before too.  BTW ICIM I inserted another semicolon after the closing brace.   Ok.  That works as a Favorites Bar button (aka favlet) too.   What are we arguing about?   ; )

    Tuesday, May 14, 2013 6:40 AM
  • Nothing.... the OP is the one with their desktop bookmarklet.

    Rob^_^

    Wednesday, May 15, 2013 3:22 AM
  • Nothing.... the OP is the one with their desktop bookmarklet.

    Rob^_^


    The OP closed this topic more than a year ago. And accepted IE cannot handle shortcut keys to fav bar buttons (if the URL is a piece of javascript).
    Wednesday, May 15, 2013 7:28 PM