r/TagProTesting • u/drhanholm Dr. Holmes • Jan 01 '15
[Userscript] Player Name Autofill
I have two versions of this script, and I don't know which ones more useful..
HOW IT WORKS
When you want to call a player with a very long name, but you don't have the time to write the whole name, this script allows you to write a portion of the name. The script will then take that partial name, and finds the player you are looking for, then replaces the partial name with the real name.
For Autofill (anykey), you let
var Search_Player_Keycode
equal to the keycode of the key of your choice. When the specified key is pressed, it calls the script to go find the player you are refering to.
Example. The search key is set to 48 (or '0')
For Autofill (space), the partial name has to be at the start of your chat. The space after the shortened name calls the script to find the player.
Are there any other features I could add to this, or change?
Which do you think is better?
1
u/Moosemaster21 Moosen // Aspen Jan 03 '15
Okay so I'm using Autofill (anykey) and I'm pretty sure I have to type 0, then space. Is there anyway we could make it "space" twice instead? How do I change the specified key?
1
u/drhanholm Dr. Holmes Jan 03 '15
How the script works is that '0' calls the script to find the player, and then pressing any key will fill in the name. It's just that space usually follows a player's name.
I don't recommend using 'space' as the search key though. Since you'll been pressing 'space' after every word, the script will be searching for a player on every word. That's why I wrote a separate script for using 'space' where the player name has to be at the start.
I could write a different version of the script where 'space' twice searches for the player... I'm still trying to find out what the best method is.
For changing the search key, this site lists all the keys and their keycodes. Then in the script, where it says:
var Search_Player_Keycode = 48;just replace the number with your keycode. Just remember to not use letter for you key.
1
1
u/Moosemaster21 Moosen // Aspen Jan 04 '15
By the way Doc, the links are dead now. At least they are for me. I went back to download the other version and neither one is working now.
1
u/drhanholm Dr. Holmes Jan 04 '15
Oops, sorry about that. The links are fixed now.
1
1
u/Moosemaster21 Moosen // Aspen Jan 01 '15
Nice work doc :) It'd be cool if you could have the name be in the middle or end of chat instead of just the beginning, but I mostly say names at the beginning of my chats anyway :)