AutoHotkey Community

It is currently May 27th, 2012, 1:42 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: January 16th, 2010, 12:16 am 
I would like to create some hotkeys for Firefox bookmarks. Would appreciate samples of how to do this. Thanks!

-- jeff


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 16th, 2010, 7:58 am 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
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 FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 17th, 2010, 1:59 am 
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).


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 17th, 2010, 4:42 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
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 January 18th, 2010, 5:30 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 17th, 2010, 6:37 am 
Offline

Joined: March 24th, 2004, 2:34 pm
Posts: 299
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 17th, 2010, 7:01 am 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
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.
"
Image
Antonio França
My stuff: Google Profile


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 17th, 2010, 10:05 am 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
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 FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 17th, 2010, 7:48 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject: re: bookmark BU
PostPosted: January 17th, 2010, 8:53 pm 
Offline

Joined: February 27th, 2009, 9:11 am
Posts: 693
Location: Burbank, California
@JDN Check out Xmarks (http://www.xmarks.com). Works well for me.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: bookmarklets
PostPosted: January 17th, 2010, 9:11 pm 
Offline

Joined: February 27th, 2009, 9:11 am
Posts: 693
Location: Burbank, California
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: bookmarklets
PostPosted: January 17th, 2010, 9:32 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
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 FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 17th, 2010, 9:34 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
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 FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 17th, 2010, 9:37 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
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-attac ... ookmarking

It works

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 18th, 2010, 4:38 am 
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-attac ... ookmarking


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...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 18th, 2010, 5:49 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: bobbysoon, Google Feedfetcher, JSLover, Tipsy3000 and 17 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group