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 

Retrieving URL in Firefox - it is STILL possible

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources
View previous topic :: View next topic  
Author Message
songsoverruins



Joined: 01 Oct 2005
Posts: 30
Location: Finland

PostPosted: Fri Jan 20, 2006 3:31 pm    Post subject: Retrieving URL in Firefox - it is STILL possible Reply with quote

Dear fellow scripters. Some two months ago I reported my findings on a method to retrieve the URL in Firefox for use in scripts (http://www.autohotkey.com/forum/viewtopic.php?t=6324&highlight=url+firefox). This was by means of the extension "URL2Title". I recently upgraded to Firefox V1.5 and to my dismay found out that this extension was not compatible with the new version and that the author stopped development of this extension.



After a search on the mozilla site however I found an alternative extension, "Copy URL+" (https://addons.mozilla.org/extensions/moreinfo.php?id=129&application=firefox) which also offers a method to retrieve the URL from the active page, albeit in a different way. This extension adds the option to retrieve the title and URL of the active page to the clipboard to the context menu (a.k.a. the menu invoked when right clicking). To incorporate this into your script add the line
Code:

Send, {APPSKEY}ut

and have your script examine the contents of the clipboard.

Admittedly, it is still not a very clean method (as it involves the context menu flashing onscreen everytime it is used) but it's the best I could find so far. One advantage over the other extension (URL2Title) is that the latter only showed the URL in the title bar when the page was finished loading. This extension doesn't have that delay as the URL can be retrieved while the page is still loading.

Hope this is of help for anyone who ran into problems after upgrading to a newer version of Firefox.
_________________
For the music lover who can sit and enjoy the sound of someone else's evolving nightmare.
Back to top
View user's profile Send private message
dirty method
Guest





PostPosted: Fri Jan 20, 2006 9:54 pm    Post subject: Reply with quote

My dirty method:
Code:

F7:: 
Splashimage,,b w180 h33 x633 Y322 cwAQUA m9 b fs18 zh0, Wait Please...
   clipboard =
winactivate,
SEND, ^c
Sleep, 999
   bak = %clipboard%
Sleep, 366
send, ^l ; URL FIREFOX
Sleep, 99
   Send, ^c
Sleep, 999
   clipboard = %bak%`r`n%clipboard%
Sleep, 999
replacementchar = _
tempclip = %clipboard%
tempfilename =
Loop, parse, tempclip, %a_space%
{
   tempfilename = %tempfilename%%a_space%%a_loopfield%
   IfEqual, a_index, 10, Break
}
stringreplace, tempfilename, tempfilename, \, %replacementchar%, 1
stringreplace, tempfilename, tempfilename, /, %replacementchar%, 1
stringreplace, tempfilename, tempfilename, :, %replacementchar%, 1
stringreplace, tempfilename, tempfilename, *, %replacementchar%, 1
stringreplace, tempfilename, tempfilename, ?, %replacementchar%, 1
stringreplace, tempfilename, tempfilename, ", %replacementchar%, 1
stringreplace, tempfilename, tempfilename, <, %replacementchar%, 1
stringreplace, tempfilename, tempfilename, >, %replacementchar%, 1
stringreplace, tempfilename, tempfilename, |, %replacementchar%, 1
stringreplace, tempfilename, tempfilename, `r`n, %a_space%, 1
FileAppend, %a_yyyy%/%a_mm%/%a_dd%___%a_hour%:%a_min%   `r %tempclip%, E:\3\1\%tempfilename%.txt
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 count = 10000
Loop
{
  IfExist,E:\3\1\%count%.txt
    count++
  Else
    break
}
FileAppend, %a_yyyy%/%a_mm%/%a_dd%___%a_hour%:%a_min%---%Clipboard%, E:\3\1\%count%.txt
count++
Splashimage,,b w1000 h633 x13 Y22 cwsilver m9 b fs9 zh0,  %clipboard%
Sleep, 999
Splashimage,,b w480 h33 x233 Y322 cwAQUA m9 b fs18 zh0,    F I L E S   I N   F : 3 \ 1 \ . .
Sleep, 266
SplashImage, Off
Return
Back to top
kiitos
Guest





PostPosted: Tue Jan 24, 2006 5:59 pm    Post subject: Reply with quote

here a nice script from AGU (retrieve also URL )
http://s89775182.onlinehome.us/forum/viewtopic.php?t=140&start=0
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources All times are GMT
Page 1 of 1

 
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