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

slack7639

Board Regular
Joined
Apr 19, 2016
Messages
65
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?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi,

This one open notepad and then open "Replace".....
Change SendKeys "^h", False to SendKeys "^+b", False and the path to your firefox




Sub CommentAddOrEdit()

Set objShell = CreateObject("WScript.Shell")
objShell.Run ("C:\WINDOWS\notepad.exe")


Application.Wait (Now + TimeValue("0:00:3"))
SendKeys "^h", False


End Sub
 
Upvote 0
Figured it out, thanks!!! Here's what works:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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 meand "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
 
Upvote 0
Here's the way I figured out how to do this with NirCmd . . . I put a button to these two .BAT files in Excel

Two Library skins are opened . . . one of them has the focus on "Other Bookmarks"

Note: I have to have NirCmd open it. Any of the other ways (like by just having the path, or by prefacing the path with START), and it doesn't see it.

It would see it, if I ran the "file open" and sendkeys separately, but, you want to have this all done in one .BAT file.

Any idea why it has to have an initial copy of the Library open, so that the sendkey can then work on the second copy? It would be nice if only one Library window had to be opened.

The first window for the Library has to be there, before the sendkey works. This is why I have it there to open twice.

I noticed that this code worked, the second time that I clicked it (but not the first).

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

"C:\Program Files (x86)\NIRCMD\nircmdc.exe" exec show "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -chrome "chrome://browser/content/places/places.xul"
"C:\Program Files (x86)\NIRCMD\nircmdc.exe" exec show "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -chrome "chrome://browser/content/places/places.xul"

"C:\Program Files (x86)\NIRCMD\nircmdc.exe" win activate title "Library"

"C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey pagedown down
"C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey enter press

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

I run the following, to close the two occurrences of the Library skin that are opened.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

REM NirCmd Command Reference - closeprocess . . . http://nircmd.nirsoft.net/closeprocess.html
"C:\Program Files (x86)\NIRCMD\nircmdc.exe" win close title "Library"
 
Upvote 0
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Using a bat file, were I have to launch the skin twice to get it to work . . . . could it have something to do with this (stdin, stdout, stderr)?

I came across this figuring out how to get my bookmarks out of Firefox, and into a .CSV . . . there is something that goes on which you can't see . . . I couldn't find any information about it on the NirCmd site:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

[OT-Sqlite3 script] to lunch some sqlite commands by file - wxWidgets Discussion Forum . . . [Vague clue of how to get the .CSV with a .BAT file] . . . Yes. SQLite3 comes with a command line shell, which allows you to do just that. You could enter the commands for SQLite into an ordinary ASCII text (i.e. mysqlcmds.txt) file and then call the shell using input redirection . . . https://forums.wxwidgets.org/viewtopic.php?t=17865

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

batch file - Redirecting command input using < - Stack Overflow . . . [Why can't you put the commands in the .BAT file? Why doesn't that work?] Parameters that are provided on the command line are completely different than stdin (where your redirected input goes). This is true for both batch scripts as well as .exe programs . . . Some programs are designed to accept the same values via command line arguments or stdin. But that is not the norm. That is a feature that is provided by the developer of the program . . . https://stackoverflow.com/questions/12511323/redirecting-command-input-using

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Standard streams - Wikipedia . . . The three input/output (I/O) connections are called standard input (stdin), standard output (stdout) and standard error (stderr) . . . https://en.wikipedia.org/wiki/Standard_streams
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top