Hello! I use AHK for a longer time already, but all I can do is creating simple hotkeys (I never had the need for something bigger). The script that I would like to create now exceeds my abilities and it would take a lot of time to learn all the stuff required for making this script.
That's why I would like to request this script here, in the hope that someone is in the mood to create one (if it's not too much trouble). Or if someone could at least point me to the relevant tutorial docs which contain the necessary ahk features to create such a script, or even to an already existing similar script, that would be asweome too!
The Goal
So I have this big excel list of player names (sorted in alphabetic order):
Now I would like to have the 2 columns rank & guild auto-completed with the help of AHK, since doing it manually is very time consuming. I also plan to update the list once in a while (every 2nd month or so).
The guild and rank information for every player can be found on this site:
http://www.realmeye.com/
For example, to view the player page of the player GoobyPless, I just need to type his player name in the search field, or just directly include his name in the url right after "realmeye.com/player/":
http://www.realmeye....ayer/goobypless
The player page looks like this:
As you can see, GoobyPless' rank is a yellow star, and his guild is The Stunning. These 2 values should now be copied to the excel chart in the corresponding columns.
That's all! Now the ahk script just needs to do it for every single player listed in the excel chart.
Guild & Rank in Source Code
The guild and rank data of a player in realmeye.com is also included in the source code of the page:
Rank
Syntax of the rank:
<div class="star star-yellow">
in general:
<div class="star star-PLAYER_RANK">
note: in total there are 6 ranks:
Guild
Syntax of the guild name:
<a href="/guild/The Stunning">The Stunning</a>
in general:
<a href="/guild/GUILD_NAME">GUILD_NAME</a>
How the script could work
1) switch to excel window
2) copy the first player name from the excel chart, in this case it's "Aarbies"
3) switch to firefox
4) go to http://www.realmeye.com/player/Aarbies
5) open the page's source code
6) getting the player's rank
- search for the phrase star star-
- copy the phrase between star star- and ">
- that's the player's rank --> in this example it's yellow
7) getting the player's guild name
- search for the phrase guild/
- copy the phrase between guild/ and ">
- that's the player's guild name --> in this example it's The Stunning
8) close the source code page
9) swich back to excel
10) paste the copied rank and guild name in the corresponding columns/row
11) That's it. Now the ahk script starts over again (loop), but now with the next player --> repeat for every single player in the excel list
Note#1: Maby it's easier/faster to paste the gained player data in a notepad editor instead of directly pasting them in the corresponding excel cells. I could then simply copy the collected data from the notepad file into the excel chart when the ahk script finished its work.
Note #2: Some profiles are "hidden" and not accessible:
In this case, the ahk scripts just needs to skip the "hidden" player (do nothing) and go on with the next player in the excel chart.
Note #3: Some players have no guild:
In this case, the ahk scripts needs to leave the guild cell of the specific player blank. For example, if PlayerA already had a guild in the past but now is guildless, his cell will now be blank.
Thanks for your replies!