-
Notifications
You must be signed in to change notification settings - Fork 2
Discord.ahk
This script contains a class called Discord
and encompasses all functions I use to manpulate discord.
All functions within this classed are called like: discord.func()
This function uses an imagesearch to look for buttons within the right click context menu as defined in the screenshots in ..\Support Files\ImageSearch\disc[button].png
and automatically clicks the one you're after, allowing the user to more quickly navigate the UI.
This function is constantly being broken as discord updates their logo/the text for words. When this happens you can try taking new screenshots to see if that fixes the issue.
This function may encounter different behaviours depending on the orientation of the monitor that it's on/the resolution. It hasn't been tested on anything higher than a
1440p
monitor.
This function automatically disables the
@ON
ping when replying to someone. This can be disabled by setting the class variabledisableAutoReplyPing
tofalse
.
discord.button( [button] )
Type: String - Filename
This parameter is the full filename of the button of choice. ie.
DiscEdit.png
orDiscReply.png
. Will require screenshots of said property in the appropriate ImageSearch folder.
This function will search for and automatically click on either unread servers or unread channels depending on which image you feed into the function.
discord.Unread( [which] )
Type: Integer
If you feed in nothing it will search for the first unread server and click it. If you feed in
2
it will search for the first unread channel and click on it. Will require screenshots of said property in the appropriate ImageSearch folder.
This function allows the user to wrap the highlighted text with whatever characters they want.
discord.surround( [char {, onFailSend := A_ThisHotkey}] )
Type: String
This parameter is the desired character(s) to wrap the text with.
If the passed
char
variable is 2 characters long, the first character will be appended at the beginning of the highlighted text & the second character will be appended to the end of the highlighted text.If the passed
char
variable is 2 characters long & you aren't highlighting anything OR it fails to wait for data, this function will attempt to highlight the chat window and send the hotkey that activated the function (by default).
Type: String
This parameter is the desired character you wish to be sent when
char
is 2 characters long and you aren't highlighting any text.
Example #1
text := "This text is highlighted"
; ` is an escape character in ahk and needs to be put twice to pass it as a variable
`::discord.surround("``") ;becomes "`This text is highlighted`"
Example #2
text := "This text is highlighted"
(::
)::discord.surround("()") ;becomes "(This text is highlighted)"
This function clicks the logo button in discord to access your friends/messages.
Keeping Track
Keyboard Shortcut Adjustments
libs & Classes
Editors
Apps
Other lib files
Hotkeys
Timer Scripts
- adobe fullscreen check.ahk
- Alt_menu_acceleration_DISABLER.ahk
- autodismiss error.ahk
- autosave.ahk
- gameCheck.ahk
- Multi-Instance Close
Other Scripts
Other Guides