Page 1 of 1

When color found - Sends discord message  Topic is solved

Posted: 12 Sep 2019, 18:38
by Lint
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

Re: When color found - Sends discord message

Posted: 12 Sep 2019, 18:40
by Lint
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.

Re: When color found - Sends discord message

Posted: 12 Sep 2019, 18:56
by Masonjar13
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.

Re: When color found - Sends discord message

Posted: 12 Sep 2019, 19:15
by Lint
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.