When color found - Sends discord message Topic is solved

Ask gaming related questions
Lint
Posts: 4
Joined: 12 Sep 2019, 18:32

When color found - Sends discord message  Topic is solved

12 Sep 2019, 18:38

Hello, I’ve been working on a script that searches for a color in a specific region of game. Once found the script alt tabs to discord, types a message, the alt tabs back to game to continue search. The script works in its current state but does rely on only having discord and game up for the alt tabs to work and I would love to clean it up.

Can anyone recommend a better way to send the discord message once the color is found? Don’t mind doing research just need a direction to head.

Edit: This method breaks Discord TOS, I’m sure there’s a way to do same function using web hooks or something?

Thanks :wave:

Code: Select all

Pause On

F10::

	Pause, Off
ToolTip, SCANNING, 10, 10, 1
Loop
{
	Sleep, 1000
	PixelSearch, Px, Py, 378, 25, 1540, 47, 0xEAFF00, 0, Fast
	if ErrorLevel = 1
	{
 	   	Continue
	}
	else
	{
  	  
	  Sleep, 1500
	  Send, {ALT DOWN}{TAB}{ALT UP}
	  Sleep, 1500
	  Send member > COLOR FOUND <  {Enter}
	  Sleep, 500
 	  Send, {ALT DOWN}{TAB}{ALT UP}
	  Sleep, 114500

	  Continue
	}

	Sleep, 1000
}
F11::ExitApp
return
Last edited by Lint on 13 Sep 2019, 19:54, edited 2 times in total.
Lint
Posts: 4
Joined: 12 Sep 2019, 18:32

Re: When color found - Sends discord message

12 Sep 2019, 18:40

If it’s useful I can post the script here, but you were warned... It is very ugly as I have no scripting experience. It’s put together with many google searches and trial and error.
User avatar
Masonjar13
Posts: 1514
Joined: 20 Jul 2014, 10:16
GitHub: Masonjar13
Location: Не Россия

Re: When color found - Sends discord message

12 Sep 2019, 18:56

Two things. First, yeah, posting the script should be the first thing you do, so people know what you're doing and can figure out how to help you. Second, what you've described breaks Discords TOS, which makes you subject to being banned by them. Thought I'd give you a fair warning.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
Lint
Posts: 4
Joined: 12 Sep 2019, 18:32

Re: When color found - Sends discord message

12 Sep 2019, 19:15

Alrighty then, well then I guess my question shifts a bit. Is this something AHK can do without breaking discord TOS through a “bot” account?

Like I said in the first post I have no issue doing the research, but when it comes to Discord and AHK’s interaction with it I’ve never seen anything similar that would give me a place to start. Most of what I find is spamming script or deleting messages.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 31 guests