I believe many of you have seen 2tim20's post about How to CE with an Xbox Controller
. But not all people here have an xbox controller or might feel like plugging it in just for CE. That's why I decided build one that works on your keyboards (and with extra buttons) :)
Now let's get into the fun
What does this do?
It's a script that allows you to use your keyboard in the Light CE to click each adopt and change between adopts and even add $BC rows (if you want to) all without the need of a mouse. It uses AutoHotKey to run.
I opted to use the numpad keys so the script wouldn't interfere with regular typing and computer usage. I thought it'd be better than having to pause it too often if, like me, you tend to multitask while you CE. All the keys can be remapped to whatever key you prefer
by messing with the code a little.
The "$BC Row" key is a little far from the rest of the buttons because I feared some clumsy people (like me) could accidentally click it, but you're free to change it.
How do I get this to run?
1. First you'll need to download and install AutoHotKey
2. Open notepad and insert the Raw paste data from either:
a) this pastebin for the fixed coordinate version
(in which the mouse position for each adopt isn't variable) OR
b) the random coordinate version
(if you'd rather have it click a different position inside an area) in it.
I personally feel the fixed version works faster, and is probably easier to understand and configure. On both links the coordinates are configured for a 1920x1200 resolution (and on google chrome with the bookmark bar set to always display). If those aren't your configurations, you will have to change these coordinates accordingly. Scroll down further to see how to find out the coordinates.
3.Save it as an .ahk file anywhere on your computer:
4. Double click it to run.
You can pause, restart or terminate this script by right clicking the AutoHotKey icon on your system tray.
How do I know the right coordinates for my monitor and browser?
You'll need to take a screenshot (Print Screen button if you're on windows), open Paint and paste it (ctrl+v) there. Then click the brush tool and simply hover above the part of the image you want to find the coordinates to. They will be displayed at the bottom left corner of the application. The first number is the X (horizontal) coordinate, and the second number is the Y (vertical) coordinate.
After that you simply change the numbers on the code to those that work for you. It might take a couple of tries if you get something wrong, but you can do it! :)
Edit: Made somewhat more visual instructions to this bit to help people out.
1. Hit the print screen button on your keyboard when you're at the CE.
2. On your computer taskbar, write "Paint" on the search bar, and then open the program.
3. Once inside the Paint application, hit ctrl+v, your screenshot should now have been pasted. Find and write down the coordinates according to this screenie's instructions (click the image for full size). Basically you need to hover your mouse over the places you want to check for coordinates.
4. Now that you have the coordinates, simply transfer the numbers to the script. In some cases it might not work perfectly at first, but usually by doing small tweaks in amounts of 2~10px and then reloading the script you'll quickly find the right ones. xD
Making changes/understanding the code
When changing the code while the script is running, remember to double click it again to reopen it with the updated code, or close the script when making alterations to it.
I commented the text to help it make a little less confusing, comments start with ;
The Fixed Coordinate
version is a little easier to understand I think, simply replace the x and y coordinates for those you want (the numbers). you can know which button is assigned to what by looking at the comments.
BUT IF you're using the random coordinate version:
Random, 1x, 855, 949 ; x min and max coordinates for the left adopt
Random, 1y, 195, 308 ; y min and max coordinates for the left adopt
This makes the script get a random value for a variable. 1x is the name of the variable, and it corresponds to another part of the code further below. Each of these variables have their own names.
Let's say the current script is making you click the left adopt too far to the right, and you want to make it click a bit more to the left. You'll change the minimum and maximum x coordinates, 855, 949
, to whatever number suits your screen (655, 749 for example).
^ This bit of the code is the variables being applied, they go inside %%, when in action, it automatically replaces the variable name for the number obtained on the "Get" part of the code. You don't really have to worry about changing anything in these parts unless it's something like this:
Click, %selectadpt%, 550 ;this number is the y coordinate
In that case you might have to change the 550
to whatever vertical (y) coordinate works for your screen.
I want this to activate only if I have numlock ON or numlock OFF
Currently the scripts works whether you have numlock on or off by using something like this
Click %2x%, %2y%
Do you see there are two numpad instances responding to the code? That's what you'll need to change for every key. Simply delete or comment out (by adding a ; before it) the part you want to stop working. In this case, if you wanted it to work with numlock ON only, you'd delete "NumpadRight::". If you wanted to make it work with numlock OFF only, you'd delete "Numpad6::". And so on for each of the others keys.
My keyboard doesn't have a numpad! Or I want to use different shortcut keys
Each key is marked by a :: after them on the code. To change it to another key, use this
as a reference.
So if instead of using the right numpad for clicking the right adopt you wanted to use the number 2 on your keyboard you'd change
Click %2x%, %2y%
I don't like using random variables! It bugs me to see it change or this is all too confusing
Click %2x%, %2y%
Just use the code on the first pastebin link and edit it to your coordinates, it's easier than the second. :)
Feel free to reply this thread with your altered scripts, so people with the same resolutions/browsers can use them without having to mess around with the code themselves. I'll edit this post to include them for everyone's easy access, with credits of course. :)
Also, feel free to suggest other type of alterations. It's my first time building an AutoHotKey script, so there might be simpler ways to do this, I have no idea, but I'm open to hearing about it.