Launch Firefox with FD in new tab
Ray Fri, 08/22/2008 - 21:11
I'm new to Firefox and used to Opera. In Opera, when I launch 'opera.exe' the default behavior is if there is already an existing Opera window, to focus that window and open a new tab (if no window exists, it opens a new window of course). In Firefox, the default is to open a new window when you launch 'firefox.exe'. So I modified my shortcut to launch "firefox.exe -new-tab about:blank". This works how I want it except that I want the new tab to be Fast Dial. Of course that's how it works in FD 1.9, but I'd like to stick with 2.1.
This may seem pointless but my habit is to just launch my browser whenever I want to use it rather than trying to find it if it's already open. So is there any way to launch Firefox and have it open a new tab with FD 2.x?
Things I've already tried:
firefox.exe -new-tab chrome://fastdial/content/fastdial.html (does nothing)
firefox.exe -new-tab file:///path/to/profile/extensions/.../fastdial.html (either did nothing or opened blank tab)
firefox.exe -new-tab file:///redirect.html (local page with window.location redirect: if the location was set to an http address, it would open in a new tab and redirect, but if set to chrome: it would skip the redirect and render the page)
userscript to redirect (similar problem to above)
Any other suggestions? Am I missing a way to do this without having to use the -new-tab flag? Any plans to have FD 2.x replace about:blank like 1.9 did?
Thanks in advance!
Re: Launch Firefox with FD in new tab
Submitted by Ray on Sat, 08/23/2008 - 13:31It occurred to me this morning that I could use an autohotkey script to open Firefox how I described rather than launching it with the executable. It will focus Firefox if it's already open somewhere or launch it if it's not. If Fast Dial is the active tab, it does nothing else. If Fast Dial is not the active tab, it opens a new tab with Fast Dial.
If anyone is interested - here it is. Enjoy!
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This script launches Firefox how I like it
IfWinExist, ahk_class MozillaUIWindowClass
{
WinActivate
WinGetTitle, Title, A
if (Title = "Fast Dial - Mozilla Firefox") {
return
}
else {
SendInput ^t
}
}
IfWinNotExist, ahk_class MozillaUIWindowClass
{
Run "%PROGRAMFILES%/Mozilla Firefox/firefox.exe"
;wait for Firefox to open
Loop
{
ifWinActive, ahk_class MozillaUIWindowClass
{
;need to wait a little more for title to include tab name
WinGetTitle, Title, A
if (Title = "Mozilla Firefox") {
continue
}
else {
break
}
}
}
WinGetTitle, Title, A
if (Title = "Fast Dial - Mozilla Firefox") {
return
}
else {
SendInput ^t
}
}
return
Re: Launch Firefox with FD in new tab
Submitted by gumanov on Sat, 08/23/2008 - 14:33hmm interesting solution..
i was looking through a list of all firefox commands line arguments, and some interesting ones are:
-new-tab
-url
-chrome
i tried the -chrome one followed by:
chrome://fastdial/content/fastdial.html
and when the shortcut is opened, FD opens in a mini window, if resized, its FD in its own window all alone, looks kinda cool actually..
but doesnt solve your problem..
so anyway, thnx for sharin the info..
heres a link to autohotkey for those interested:
http://www.autohotkey.com/download/
Re: Launch Firefox with FD in new tab
Submitted by Anonymous (not verified) on Sat, 08/23/2008 - 18:52If you tell Firefox in the options menu to always keep a tab visible AND tell it to open on a blank page, you will get FD on a fresh tab...
John
AA4PC
(I can't seem to get my sign up e-mail so I can properly sign in...)