Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Get to Other Bookmarks in Firefox using NirCmd?  (Read 3960 times)

0 Members and 1 Guest are viewing this topic.

slack7639

    Topic Starter


    Rookie

    • Experience: Beginner
    • OS: Unknown
    Get to Other Bookmarks in Firefox using NirCmd?
    « on: December 31, 2017, 08:44:16 AM »
    Hello.  I'm not getting assistance with my question here:

    Get to Other Bookmarks in Firefox using NirCmd? . . . https://www.computing.net/answers/office/get-to-other-bookmarks-in-firefox-using-nircmd/21151.html

    To summarize, I would like to use NirCmd in a .BAT file to get to "Other Bookmarks" in Firefox, like how you can use Ctrl+Shift+B

    It seems like you could run this code, and it would work, but you have to open the "Library" skin twice, in order for it to "work" (you have two "Library" skins open):

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

    "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 down
    "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey pagedown up
    "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey enter up

    Salmon Trout

    • Guest
    Re: Get to Other Bookmarks in Firefox using NirCmd?
    « Reply #1 on: December 31, 2017, 12:30:05 PM »
    It works for me with the second "open Firefox" line commented out (or removed). Only one "Library" window open. I have my Nircmd files in a different folder from you, but I don't think that makes any difference.

    I am not surprised you got few answers in that other place, since your question is way off-topic, as the forum is for questions about Microsoft Office.

    Click image to zoom it.


    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: Get to Other Bookmarks in Firefox using NirCmd?
    « Reply #2 on: December 31, 2017, 05:46:47 PM »
    Is that roast beef at the bottom of the pic ? ?...:P
    " Anyone who goes to a psychiatrist should have his head examined. "

    Salmon Trout

    • Guest
    Re: Get to Other Bookmarks in Firefox using NirCmd?
    « Reply #3 on: January 01, 2018, 02:07:19 AM »
    Is that roast beef at the bottom of the pic ? ?...:P

    It's part of some girl's dresses in the bottom left of a painting called 'A Tale from the Decameron' by John William Waterhouse (my wallpaper at the the time).


    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: Get to Other Bookmarks in Firefox using NirCmd?
    « Reply #4 on: January 01, 2018, 07:10:38 AM »
     ;)
    " Anyone who goes to a psychiatrist should have his head examined. "

    Salmon Trout

    • Guest
    Re: Get to Other Bookmarks in Firefox using NirCmd?
    « Reply #5 on: January 01, 2018, 07:47:13 AM »
    ;)
    I knew you were being frivolous, but it's such a nice painting, I thought it would liven up the thread a bit, especially since the OP seems to have lost interest.

    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: Get to Other Bookmarks in Firefox using NirCmd?
    « Reply #6 on: January 01, 2018, 08:24:32 AM »
    It is nice...
    " Anyone who goes to a psychiatrist should have his head examined. "

    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: Get to Other Bookmarks in Firefox using NirCmd?
    « Reply #7 on: January 01, 2018, 09:08:50 AM »
    I remember when i had a slideshow of M.C. Esher drawings as my wallpaper....i never got any work done...
    " Anyone who goes to a psychiatrist should have his head examined. "

    slack7639

      Topic Starter


      Rookie

      • Experience: Beginner
      • OS: Unknown
      Re: Get to Other Bookmarks in Firefox using NirCmd?
      « Reply #8 on: January 02, 2018, 12:01:14 PM »
      Salmon, can you try that .BAT file . . .

      . . . but make sure that neither the Firefox browser, nor a copy of the Library "skin" is open.

      I think that what you'll see is that it will open the Library "skin" to "All Bookmarks", but NirCmd won't do anything.

      . . . ie. The sendkeys will not "act on" the Library "skin"

      From what I'm seeing, NirCmd needs one of the above two "already open" in order for it to be able to work

      Salmon Trout

      • Guest
      Re: Get to Other Bookmarks in Firefox using NirCmd?
      « Reply #9 on: January 02, 2018, 01:56:10 PM »
      Hey, you're right. If you only start one nircmd exec show Firefox, the send key stuff does not work, but if you start two, it does work on the second one.

      However, if I start two Library windows, then kill the first one, the send keys stuff works on the second one.

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

      REM Wait for Firefox to get going
      REM You could use a Sleep command here instead if you have sleep.exe
      :loop
      tasklist /v | find "Library" && goto next
      goto loop
      :next

      REM On my system I needed at least 5 milliseconds of sleep
      REM Maybe 10 or 100 would be safer
      REM Using the sleep.exe with the -m option
      REM In the Windows 2003 Resource Kit Tools
      REM https://www.microsoft.com/en-us/download/details.aspx?id=17657
      REM sleep -m 10

      REM Taskkill will terminate the first window it finds with the title "Library"
      REM which will be the first one you started then exit, leaving the second one running
      taskkill /FI "WINDOWTITLE eq Library"

      "C:\utils\nircmdc.exe" win activate title "Library"
      "C:\utils\nircmdc.exe" sendkey pagedown down
      "C:\utils\nircmdc.exe" sendkey enter down
      "C:\utils\nircmdc.exe" sendkey pagedown up
      "C:\utils\nircmdc.exe" sendkey enter up






      slack7639

        Topic Starter


        Rookie

        • Experience: Beginner
        • OS: Unknown
        Re: Get to Other Bookmarks in Firefox using NirCmd?
        « Reply #10 on: January 08, 2018, 01:25:02 PM »
        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