AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

hotkey for Firefox bookmark
Goto page 1, 2  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
jd
Guest





PostPosted: Fri Jan 15, 2010 11:16 pm    Post subject: hotkey for Firefox bookmark Reply with quote

I would like to create some hotkeys for Firefox bookmarks. Would appreciate samples of how to do this. Thanks!

-- jeff
Back to top
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Sat Jan 16, 2010 6:58 am    Post subject: Reply with quote

To create a bookmark it is by default ctrl-d, if you want to open favourite sites using shortcuts it can be done with a simple
Code:
#z::
run http://www.autohotkey.com
Return
if firefox is not your default browser include the full path to firefox.exe before the url.
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
jd
Guest





PostPosted: Sun Jan 17, 2010 12:59 am    Post subject: Reply with quote

Thanks for the reply. What I really want to do is run a bookmarklet (a chunk of javascript code stored as a URL) in the current page I'm viewing. As one example, I have a bookmarklet that removes background colors and makes the page easier to read (http://www.russellbeattie.com/blog/the-zap-colors-bookmarklet).
Back to top
a_h_k



Joined: 02 Feb 2008
Posts: 626

PostPosted: Sun Jan 17, 2010 3:42 am    Post subject: Reply with quote

How do i get it to work? I've bookmarked it, & pasted code into bookmarks "Properties" field
But when i drag it into address box & press "go" it does nothing

Edit: It works


Last edited by a_h_k on Mon Jan 18, 2010 4:30 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
JDN



Joined: 24 Mar 2004
Posts: 299

PostPosted: Sun Jan 17, 2010 5:37 am    Post subject: Reply with quote

I have a related question but I didn't want to start a new topic for this.

I am new to FireFox and have a great many bookmarks. My problem is that when I uninstall FireFox and then want to reinstall it, I lose all my bookmarks. I cannot find the file or other location where Firefox stores its bookmarks.

My problem is that I would like to be able to restore all my bookmarks quickly - ideally by copying the contents of a file.

Can anyone tell me how Firefox stores its bookmarks and what is the easiest way for me to copy a large number of bookmarks to my current version of Firefox?

Thanks very much.
Back to top
View user's profile Send private message
MasterFocus



Joined: 08 Apr 2009
Posts: 3035
Location: Rio de Janeiro - RJ - Brasil

PostPosted: Sun Jan 17, 2010 6:01 am    Post subject: Reply with quote

Open FireFox and try the following menus:
>> Bookmarks >> Organize >> Export/Import/Backup

(I'm guessing since mine is not in English)
_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"

Antonio França
My stuff: Google Profile
Back to top
View user's profile Send private message Visit poster's website
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Sun Jan 17, 2010 9:05 am    Post subject: Reply with quote

Simply send the javascript to the address bar
Code:
#z::
Send  ^l ; will focus on address bar
Send javascript:code...{Enter} ; go to bookmarklet page and copy url via rightclick
return
If that works you can try to speed it up using other methods
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
Guest






PostPosted: Sun Jan 17, 2010 6:48 pm    Post subject: Reply with quote

hugov wrote:
Simply send the javascript to the address bar
Code:
#z::
Send  ^l ; will focus on address bar
Send javascript:code...{Enter} ; go to bookmarklet page and copy url via rightclick
return
If that works you can try to speed it up using other methods


Unfortunately the javascript is too complicated; simply inserting it as a string won't work because it has special characters that are interpreted by ahk.

Also, on the test that I did, when the string is entered into the address bar, you can see the individual characters being added; I'd guess that it takes about one second for 25 characters. The bookmarklet is almost 5000 characters, so could take several minutes (and it also might well exceed the limit on the number of characters allows in the address bar).

Thanks...

-- jeff
Back to top
flyingDman



Joined: 27 Feb 2009
Posts: 690
Location: Burbank, California

PostPosted: Sun Jan 17, 2010 7:53 pm    Post subject: re: bookmark BU Reply with quote

@JDN Check out Xmarks (http://www.xmarks.com). Works well for me.
Back to top
View user's profile Send private message
flyingDman



Joined: 27 Feb 2009
Posts: 690
Location: Burbank, California

PostPosted: Sun Jan 17, 2010 8:11 pm    Post subject: bookmarklets Reply with quote

Jeff, you are right, the javascript code is too complicated to paste. I have also tried to run a simpler script like this:
Code:
 run, javascript: resizeTo(480,200)

this did not work either and actually tries to open IE rather that running it in Firefox.
Although I haven't tried it, I suggest for JD to look into Imacro, a FF add-on.
Back to top
View user's profile Send private message
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Sun Jan 17, 2010 8:32 pm    Post subject: Re: bookmarklets Reply with quote

flyingDman wrote:
Jeff, you are right, the javascript code is too complicated to paste. I have also tried to run a simpler script like this:
Code:
 run, javascript: resizeTo(480,200)

this did not work either and actually tries to open IE rather that running it in Firefox.
Although I haven't tried it, I suggest for JD to look into Imacro, a FF add-on.
What are you doing? You run your browser THEN you send the javascript to the address/location bar.
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Sun Jan 17, 2010 8:34 pm    Post subject: Reply with quote

JDN wrote:
I am new to FireFox and have a great many bookmarks. My problem is that when I uninstall FireFox and then want to reinstall it, I lose all my bookmarks. I cannot find the file or other location where Firefox stores its bookmarks.
Look for a file in your application data \ firefox \ profiles directory, it is a sqlite database file, prior to v3 it was a plain html file. Simply copy that file and you're done.
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Sun Jan 17, 2010 8:37 pm    Post subject: Reply with quote

Anonymous wrote:
Also, on the test that I did, when the string is entered into the address bar, you can see the individual characters being added; I'd guess that it takes about one second for 25 characters. The bookmarklet is almost 5000 characters, so could take several minutes (and it also might well exceed the limit on the number of characters allows in the address bar).
Did you ever hear of paste? It is the only way to go with firefox, if you use IE you might have more options look at the various IE posts.

Other trick: assign keyword to the bookmarklet so you can
Code:
send remcol
to the address bar, see
http://lifehacker.com/196779/hack-attack-firefox-and-the-art-of-keyword-bookmarking

It works
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
Guest






PostPosted: Mon Jan 18, 2010 3:38 am    Post subject: Reply with quote

hugov wrote:

Other trick: assign keyword to the bookmarklet so you can
Code:
send remcol
to the address bar, see
http://lifehacker.com/196779/hack-attack-firefox-and-the-art-of-keyword-bookmarking


Using a keyword works much works better, thanks for the suggestion.

The only disadvantage of this approach (using the address bar) is that this mucks up the url. Any ideas on how to do this without touching the address bar?

Thanks again...
Back to top
a_h_k



Joined: 02 Feb 2008
Posts: 626

PostPosted: Mon Jan 18, 2010 4:49 am    Post subject: Reply with quote

None (jeff) wrote:
Unfortunately the javascript is too complicated; simply inserting it as a string won't work because it has special characters that are interpreted by ahk.

Also, on the test that I did, when the string is entered into the address bar, you can see the individual characters being added; I'd guess that it takes about one second for 25 characters

Use
Code:
#z::
;Put the java script in Clipboard
;  (use StringReplace to "escape" chars such as %)
Send  ^l ; will focus on address bar
Sleep, 1000
Send ^v   ;is the FASTEST way to send text
return


None (jeff) wrote:
The bookmarklet is almost 5000 characters, so could take several minutes (and it also might well exceed the limit on the number of characters allows in the address bar)

The one referred to by the link is exactly 561 chars long
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group