Wild West Town Wiki
Register
Advertisement

Tired of clicking free energy links (or any other links) by hand? Here's a script which makes it a little easier. I try to explain what each command does. Please try it out and tell me what you think.


Search the web for "website link extractor" and get every link from here, except the first ones: http://wildwesttown.wikia.com/wiki/Energy_Links?action=render (i used this: http://www.webmaster-toolkit.com/link-extractor.shtml?url=http%3A%2F%2Fwildwesttown.wikia.com%2Fwiki%2FEnergy_Links%3Faction%3Drender&type=href )

Copy all the giftlinks into notepad and save it as C:\konglinks.txt


Get AutoHotKey (AHK) from here: http://www.autohotkey.com/download/

Start the software, make a rightclick on the icon (right side in the taskbar) and select "Edit this script".

Paste the following into the editor, save it:

;Comments start with semicolon. I'll try to explain what this stuff does:
;You can easily change the waiting-times yourself!

;Start the script with the left shift button
LShift::
{ 
ArrayCount = 0

;Read the konglinks.txt in C:\ Here's the place to change the path or name of the .txt-file
Loop, Read, C:\konglinks.txt
{
ArrayCount += 1
Array%ArrayCount% := A_LoopReadLine
}
Loop %ArrayCount%
{

;Crtl+t is send to open a new tab. So yeah, no compatibility for Netscape.
send ^t

;wait 1 sec because you have a slow computer
sleep 1000

;take the next link
element := Array%A_Index%

;write the link in the new tab
send % Array%A_Index%

;wait a sec here, because why not?
sleep 1000

;press Enter to load the link
send {Enter}

;Wait for the page loading. Try out for yourself how long your browser needs to load the page.
;If your computer is faster (or slower), adjust this value in milliseconds. 1 second = 1000 milliseconds.
sleep 20000

;Close the tab
send ^w

;Wait a sec...
sleep 1000
}
}
Return

;DONE

Make a rightclick on the AHK-icon and select "Reload script".

Make it work: Open your browser, press shift. Go take a long shower or mow the lawn. With these settings one link gets done in 23 seconds so it takes a while. Adjust as needed. Don't forget to end AHK after you're done!

Advertisement