yoyo question

Discussion in 'Windows Desktop Systems' started by Perris Calderon, Nov 5, 2003.

  1. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    obviousy, anyone else that knows, please do come in

    I want to get "open with mozilla" in my right click without going through "open with"

    any suggestions?
     
  2. GoNz0

    GoNz0 NTFS Stoner

    Messages:
    2,781
    Location:
    the year 2525
  3. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    I think that'll work, I'll give it a go later.

    thanx gonxo...gonna make it one of "my favorite tweaks" once I get it done...give you credit for the help thanx again
     
  4. GoNz0

    GoNz0 NTFS Stoner

    Messages:
    2,781
    Location:
    the year 2525
    if it works ;)
     
  5. yoyo

    yoyo _________________

    Messages:
    1,557
    Hi dealer,

    it is easy to add the "open with mozilla" option to files like html or htm or if you like gif or whatever. Just run the example regfile below to add the option to .html and .htm files. Edit the text to the actual path and name of your mozilla executable. (Don't forget there have to be double backslashes in path entries in regfiles \\)

    ;-------------------------------------------
    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\htmlfile\shell\mozilla]
    @="Open with Mozilla"

    [HKEY_CLASSES_ROOT\htmlfile\shell\mozilla\command]
    @="\"C:\\Program Files\\MozillaFirebird\\MozillaFirebird.exe\" -url \"%1\""

    ;----------------------------------------------------

    Unfortunately didn't succeed to get this option for internet shortcuts as well so far. Making the same registry changes as above for the InternetShortcut file type, just shows the text of the file in mozilla but doesn't open the url. Internet shortcuts are text files. The second line containing the url. Would need an additional file to parse this to mozilla.


    .
     
  6. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    ya, I need it for the internet shortcuts, and favorites...that'd be sweet to do, when I'm in ie to be able to toggle my favorites to the mo with a right click...that's why I wanted it
     
  7. yoyo

    yoyo _________________

    Messages:
    1,557
    Ok, made it with an oldfashioned batch file for now. Not the most elegant way, a command window will open 'til Mozilla starts. It seems to work, at least for me. Only tested with Firebird, but should be the same for Mozilla.

    To add the "Open in Mozilla" option to the right click menu of internet shortcuts:

    First copy this text into notepad, adjust the part in red to the actual name and path of your mozilla executable. Save it as "moz.bat" to a folder.
    Make sure that it is only one line. No breaks.

    for /f "usebackq tokens=2 delims== eol=B skip=1" %%a in (`find "http" %1`) do start /b /d "C:\Program Files\mozillafirebird" mozillafirebird.exe -url %%a

    Step two, copy the text below into notepad, adjust the part in red to the path where you saved the batch file. Save it as "Moz.reg" then right click - merge.

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\InternetShortcut\shell\mozilla]
    @="Open in Mozilla"

    [HKEY_CLASSES_ROOT\InternetShortcut\shell\mozilla\command]
    @="\"
    C:\\folder\\moz.bat\" \"%1\""

    -------------------------------------------------------------------------------
    To undo the whole thing again merge this last regfile and delete the batch file.

    Windows Registry Editor Version 5.00

    [-HKEY_CLASSES_ROOT\InternetShortcut\shell\mozilla]





    .
     
  8. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    going to try this later tonight yoyo...thanx alot...are you gonna use this one yourself too?
     
  9. yoyo

    yoyo _________________

    Messages:
    1,557
    For now I think I will use it.
    But consider it an alpha version.
    Just noticed it will not work with all shortcuts. If an url contains = signs it will only be read 'til the first =.
    I knew I'd overlooked something. Will be thinking about a better solution.
     
  10. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    cool...lots of my shortcuts have equal signs.

    for instance, show new posts here is;

    Code:
    http://www.ntfs.org/forum/showthread.php?s=&threadid=40326
     
  11. Un4gIvEn1

    Un4gIvEn1 Moderator

    Messages:
    1,084
    change "tokens=2" to "tokens=2*" and that should take care of the problem with the = signs.
     
  12. yoyo

    yoyo _________________

    Messages:
    1,557

    Unfortunately not. This would skip the delims (=) and in dealer's example still only parse
    http://www.ntfs.org/forum/showthread.php?s
     
  13. yoyo

    yoyo _________________

    Messages:
    1,557
    Updated version beta 1.0 . ;) Hope it works now.

    To add the "Open in Mozilla" option to the right click menu of internet shortcuts:

    First copy this text into notepad, adjust the part in red to the actual name and path of your mozilla executable. Save it as "moz.bat" to a folder.

    for /f "skip=2 eol=B" %%a in ('find "http" %1') do set %%a
    start /b /d "
    C:\Program Files\mozillafirebird" mozillafirebird.exe -url "%url%"

    Step two, copy the text below into notepad, adjust the part in red to the path where you saved the batch file. Save it as "Moz.reg" then right click - merge.

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\InternetShortcut\shell\mozilla]
    @="Open in Mozilla"

    [HKEY_CLASSES_ROOT\InternetShortcut\shell\mozilla\command]
    @="\"
    C:\\folder\\moz.bat\" \"%1\""

    -------------------------------------------------------------------------------
    To undo the whole thing again merge this last regfile and delete the batch file.

    Windows Registry Editor Version 5.00

    [-HKEY_CLASSES_ROOT\InternetShortcut\shell\mozilla]
     
  14. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    ok, just to be clear before I merge;

    my bat folder is C:\Documents and Settings\me\Desktop

    it's name is moz on my desktop

    so dies this go in the "folder" part?

    C:\Documents and Settings\me\Desktop

    I don't see the referance to the moz batch, so I don't see how this will get recognized.

    I must be doing something wrong
     
  15. yoyo

    yoyo _________________

    Messages:
    1,557
    You have saved the moz.bat batchfile on your desktop?
    In this case the last line of the reg file would look like:

    @="\"C:\\Documents and Settings\\me\\Desktop\\moz.bat\" \"%1\""

    or is it a folder named moz on your desktop?

    in this case

    @="\"C:\\Documents and Settings\\me\\Desktop\\moz\\moz.bat\" \"%1\""

    Remember to use double backslashes for path values in regfiles.
     
  16. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    ya, I'm practicing on my desktop, then I'll move it somewhere else when I get it working

    I'm at work, I"ll get to this tonight...thanx yoyo
     
  17. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    yoyo, I know you don't usually remember to read your pm's, so I figure I'll point out here I sent you one. (or 4)

    I sent along a paper I'm writing I'd like you to co author...if you get a chance and you're interested, take a look

    ok, back on topic

    I'll get this tweak worked out and put it on the "our favirite tweaks thread with all credit given

    thanx again

    if an iyou make an improved version , let me know...this is great for people like me that like to toggle between broswers
     
  18. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    I keep missing...I get "cannot find moz.bat...I'll figure out why tomorrow.

    `
     
  19. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    ok, now windows found the .bat, but the .bat is giving the wrong location..shoot

    this is the loacation of my firebird;

    "C:\Documents and Settings\me\Desktop\MozillaFirebird\MozillaFirebird.exe"

    this is my bat file;

    Code:
    for /f "skip=2 eol=B" %%a in ('find "http" %1') do set %%a 
    start /b /d"C:\Documents and Settings\me\Desktop\MozillaFirebird\MozillaFirebird.exe" mozillafirebird.exe -url "%url%"
     
  20. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    I put the bat file in a folder called "programs" which is on my desktop

    what am I doing wrong?