Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 05, 2016, 12:38:12 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: DONE: Have list of URLs, and, in Chrome, manually load one, then next, etc.  (Read 11965 times)

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Say we have a list of 100 URLs, and want to load these one at a time in Chrome.  Not in different tabs, but in the same tab.  Suppose that only one tab is needed, and only one tab will then be open.

I'd like to manually move through these URLs, spending as much time as I want on the opened page, then clicking or pressing a button and moving on to the next page.

Preferably the pages already visited can be deleted from the list, at some point.

Preferably the list can be saved, and brought up again, so that progress can be continued with the remaining URLs.

Preferably one can have more than one such list.

Thanks for suggestions, or possibly a program.

Nicholas Kormanik


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
neat idea.

It would be pretty easy to make a browser-neutral version that just had a list of urls, where you clicked on to move it to a "Done" list and it opened the url in the default or specified folder.

The only limitation is that it probably wouldn't be able to close the existing tab for you, so you'd have to do that manually.



I like the idea of a browser neutral tool.  There are some fun things you could do with this too, including keeping track of the date that each url was viewed, and maybe some notes associated with it..
« Last Edit: March 12, 2013, 04:08:11 AM by mouser »

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
There is an add-in that does roughly the same in Firefox, called Flem.  But at present I prefer using Chrome.


wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,405
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
There is an add-in that does roughly the same in Firefox, called Flem.  But at present I prefer using Chrome.

Have you tried contacting the add-in author?  Sometimes they're open to porting it; they just might not initially see the need.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Here's a basic AHK example that seems to work in Firefox, IE, and Chrome.  Run it, focus your browser, and use Ctrl+Right and Ctrl+Left to cycle through the list.  Of course, change the URL list to suit.

Code: Autohotkey [Select]
  1. myURLs =
  2. (
  3. http://www.donationcoder.com
  4. http://www.filehippo.com
  5. http://www.arstechnica.com
  6. )
  7.  
  8.  
  9. StringSplit, myURLsArray, myURLs, `n
  10.  
  11.  
  12. ^Right::
  13. {
  14.     myCounter++
  15.     % ( myCounter > myURLsArray0 ) ? ( myCounter := 1 ) : ()
  16.     URL_GoTo( myCounter )
  17. }
  18. Return
  19.  
  20.  
  21. ^Left::
  22. {
  23.     myCounter--
  24.     % ( myCounter < 1 ) ? ( myCounter := myURLsArray0 ) : ()
  25.     URL_GoTo( myCounter )    
  26. }
  27. Return
  28.  
  29.  
  30. URL_GoTo( _URLnum )
  31. {
  32.     myURL := "myURLsArray" . _URLnum
  33.     SendInput, ^l
  34.     Sleep, 300
  35.     SendInput, % %myURL%
  36.     Sleep, 750
  37.     SendInput, {ENTER}
  38. }
« Last Edit: March 16, 2013, 07:51:41 AM by skwire »

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Many people have asked that Flem be ported to Chrome.  For some reason the authors of Flem decided not to.

Thanks, Skwire, for the AHK script!


skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Thanks, Skwire, for the AHK script!

You're welcome.  Is that script good enough for your purposes?  If so, I'll mark this thread as done.


nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Unless anyone has anything else to add, mark as done.

Thanks again, Skwire.  You sure come through.


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
I'd like to leave it open -- and see if anyone wants to make a real GUI utility for this -- that will let you save your url list, keep track of visited links, let you click to visit a link, etc.

I think it's a good candidate for a nice coding snack for an amature coder.

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,550
    • View Profile
    • Donate to Member
Here's a basic AHK example that seems to work in Firefox, IE, and Chrome.  Run it, focus your browser, and use Ctrl+Right and Ctrl+Left to cycle through the list.  Of course, change the URL list to suit.
...

On a random note, I'm kinda amazed that sending info to a browser is as simple as "send input". (Is THAT where it goes, to a BROWSER!?) I would have thought it would be way harder.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
No, it's not like what you think.  In fact, it's rather inelegant.  Here's a commented snippet that should explain things:

Code: Autohotkey [Select]
  1. myURL := "myURLsArray" . _URLnum ; Dereference the variable.
  2. SendInput, ^l                    ; Send a Ctrl+L hotkey to focus the address bar.  Works for FF, IE, and Chrome.
  3. SendInput, % %myURL%             ; Send the actual URL text.
  4. Sleep, 750                       ; Small wait time to allow for long(er) URLs.
  5. SendInput, {ENTER}               ; Send and Enter keystroke to load the page.

Make more sense now?  A hack, pretty much.   :-[

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Interesting.. but you could also just do a shell exec to open a url and it will open in default browser, OR simply invokle an explicit browser exe and pass the url to it on commandline.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Interesting.. but you could also just do a shell exec to open a url and it will open in default browser, OR simply invokle an explicit browser exe and pass the url to it on commandline.

Sure, but then you run the risk of multiple windows/tabs (something the OP didn't want).

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,550
    • View Profile
    • Donate to Member
No, it's not like what you think.  In fact, it's rather inelegant.  Here's a commented snippet that should explain things:
...
Make more sense now?  A hack, pretty much.   :-[

Yeah, I get it now. A big part of what I was missing was that Control-L even existed.

I was looking for some kind of "pass info to the app".

All hail hacks!  :)

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,779
    • View Profile
    • Donate to Member
A big part of what I was missing was that Control-L even existed.
+1, I've been using Alt-D for that in all mentioned browsers since ages, but Ctrl-L seems like a decent alternative :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
I'd still like to see this marked as not DONE and moved back to pending, and see what other coding snack coders might come up with.

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Skwire's solution worked fine with the example URLs he provided.

Unfortunately not so with my case:

myURLs =
(
https://plus.google....04262594301276893821
https://plus.google....04283716002131797428
https://plus.google....04309222535259801633
https://plus.google....04392019611590500945
https://plus.google....04410043740081757281
https://plus.google....04429427297929885544
https://plus.google....04479772621336105362
https://plus.google....04541959256591361052
https://plus.google....04575325257916010047
https://plus.google....04608435688900811644
https://plus.google....04612126840644619266
)
etc...

The URL box entry gets broken up.  Could be do to a number of things, like the additional search box on the webpage, or possibly a conflicting add-in loaded?

So, mission not quite accomplished.  Thanks mouser for keeping the thread active.

Possible enhancement requests, though, Squire, in case there's an easy solution to the above:

-- Allow a reference to a separate file that holds the URLs.  Such as, "c:\look at sites\url list.txt"  Instead of forcing user to edit the .ahk script file.

-- Allow for a longer list of URLs.  I got error messages that I had too many (when attempting a much longer list than that shown above).

-- Perhaps allow user to choose which key to use to go forward, for instance the insert key (though a nice addition, I don't care so much about being able to go backward).

Thanks.

« Last Edit: March 13, 2013, 07:53:32 PM by nkormanik »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
All that you want is, basically, possible.  As mouser suggested, I've moved this back to "IDEA" stage so let's see if anybody wants to pick this up.

The URL box entry gets broken up.  Could be do to a number of things, like the additional search box on the webpage, or possibly a conflicting add-in loaded?

Try increasing the sleep time in the script.  It's currently set for 750 milliseconds.

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Increased sleep to 5000, and still the same problem.

What generally happens is that the h gets chopped off at the beginning of URLs.

So only:  ttps://plus.google.com/104410043740081757281

And that, of course, doesn't go to the intended site.


skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
What generally happens is that the h gets chopped off at the beginning of URLs.
So only:  ttps://plus.google.com/104410043740081757281

Then try adding a small sleep after the ^l line, e.g.:

Code: Autohotkey [Select]
  1.     Sleep, 300
  2.     SendInput, % %myURL%

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,779
    • View Profile
    • Donate to Member
Have you changed anything else in the script? The backtick-n in the StringSplit line is leading in splitting the array up, but it didn't even get confused when I converted the file to unix-line-ends in stead of the default dos-line-ends.
Maybe there are hidden (backspace) characters in your script?

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Ath, are you asking ME?  I wouldn't change ANYTHING except what is suggested.

I'm kinda clueless regarding AutoHotkey.

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Skwire, adding the extra sleep step did the magic.  I can attest we have a working solution here now.

Maybe someone can make a stand-alone tool.  But at least we have a way that works.  Thanks much, Skwire.



Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,779
    • View Profile
    • Donate to Member
Ah, busy system, yeah, an extra delay helps a lot then. Great it got resolved.

I've been thinking about that gui, but I'm not quite fluent in AHK, so lets wait a little first :tellme:

Stephen66515

  • Animated Giffer in Chief
  • Honorary Member
  • Joined in 2010
  • **
  • Posts: 3,129
    • View Profile
    • Donate to Member
Pretty self explanatory GUI app for this:

* SendURL.rar (94 kB - downloaded 221 times.)

Will add more features if needed.

Thanks to Renegade for providing me with a big hand on this.