dorando-keyconfig icon indicating copy to clipboard operation
dorando-keyconfig copied to clipboard

How do you create a Shortcut to “Other Bookmarks” in Firefox?

Open mb1280 opened this issue 7 years ago • 3 comments

I want to make a macro in Excel 2010 that goes to "Other Bookmarks" in Firefox . . . I can't figure out how to do it

The closest I can get is, I open this "skin" / "chrome", and it default opens to "All Bookmarks" . . . "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -chrome chrome://browser/content/places/places.xul

But, what I want is, which can only be done from within Firefox . . . I use this Keyboard Shortcut, and it default opens to "Other Bookmarks" . . . CTRL + Shift + B

What I've tried:

1.) VBA "Call Send Keys" from Excel 2010 does not "act on" Firefox

2.) AutoHotKey is not able to communicate with Firefox: open FF, then input: ^+B

Is there an easy "switch" I can just add to the Shortcut "-chrome"? . . . like, -focus "Other Bookmarks" . . . This command (CTRL+U: View Source in Firefox) doesn't work on the "places.xul" skin, so I can see what it's doing.

Or, is there a Firefox CLI, that I can use in a BAT file, and have another text file "act on" it, to open to "Other Bookmarks"? Any idea where the commands to do so are provided?

mb1280 avatar Dec 20 '17 17:12 mb1280

I've not had any problems in the past having AutoHotkey work with Firefox. However, I haven't tried it since the implementation of the sandbox

So my suggestion would be to try changing the value at security.sandbox.content.level to lower numbers and seeing if that works.

And while this may go without saying, do wait until the Firefox window is actually open before sending keyboard commands, and try all the different Sending methods.

trlkly avatar Dec 20 '17 17:12 trlkly

Figured it out. This VBA code gets the job done:


Sub Delete_Other_B(control As IRibbonControl)

' After being appended, delete the bookmarks from "Other Bookmarks" ' ' Set the Path variable equal to the Path of the program

Dim x As Variant
Dim Path As String

Path = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe -chrome chrome://browser/content/places/places.xul"
x = Shell(Path, vbNormalFocus)

' If I have the time at 1 second, sometimes that's too quick, and it pages down one screen within the spreadsheet ' The tilde means "Enter"

Application.Wait (Now + TimeValue("0:00:02"))
SendKeys "{PGDN}~", False

' 12/18/17 Can you get to "Other Bookmarks" using Ctrl + Shift + B ? ' Yes, but it leaves a Firefox browser open

End Sub

mb1280 avatar Dec 21 '17 16:12 mb1280

Here's what I figured out. There's too much to put here, so, I've put it on a 4-page PDF on my Google Docs:

4 Ways to get to Firefox "Other Bookmarks", from slowest to fastest The following are 4 macros that I have in Excel 2010. The first two just use VBA. The second two use NirCmd.

https://drive.google.com/open?id=1eche0L-qHRWVA_yEh0JiL1k5SNK4HpCt

mb1280 avatar Jan 08 '18 19:01 mb1280