How do you auto accept invites on background apps?

Posts 115 of 18 · Page 1 of 2
How do you auto accept invites on background apps?
Using AHK,

wintitle = Trove
SetTitleMatchMode, 2

IfWinExist %wintitle%
{
loop
{
Random, num, 2000, 4000
SetControlDelay -1
ControlClick, x717 y400, %wintitle%,,,, NA
sleep, %num%
}
}
Return

For some reason, the click doesn't respond on the background trove app. I think the problem is that the mouse needs to move in-game before it can accept a click. I tested this without any scripts and looks right.
1) I send in an invitation to my main to join and click accept.
2) I press yes.
3) I keep mouse in exact same position and send in another invite.
4) Nothing happens, regardless of how many times I click.
5) Only after moving the mouse at least a tiny bit, the game will respond to the click

I also tried the different click variations of control click and none seems to work with coordinates.
Use spy++ to understand how the game processes messages.
You also need to make the window active in order to click in it with the mouse

Unfortunately, I do not use AHK for this I can not give a more accurate code for AHK.
What kind of app can be used to do this?
Quote Originally Posted by bobdylanfrank View Post
What kind of app can be used to do this?
"Microsoft Spy++ (Toolbar UI)"
Quote Originally Posted by bobdylanfrank View Post
Using AHK,

wintitle = Trove
SetTitleMatchMode, 2

IfWinExist %wintitle%
{
loop
{
Random, num, 2000, 4000
SetControlDelay -1
ControlClick, x717 y400, %wintitle%,,,, NA
sleep, %num%
}
}
Return

For some reason, the click doesn't respond on the background trove app. I think the problem is that the mouse needs to move in-game before it can accept a click. I tested this without any scripts and looks right.
1) I send in an invitation to my main to join and click accept.
2) I press yes.
3) I keep mouse in exact same position and send in another invite.
4) Nothing happens, regardless of how many times I click.
5) Only after moving the mouse at least a tiny bit, the game will respond to the click

I also tried the different click variations of control click and none seems to work with coordinates.
The standard ahk controlclick doesn't work with trove. You gotta use Spy++ or any similar program that can log window messages as Tisako said and then u can use Postmessage/Sendmessage to create ur own controlclick function which does work in the background.
I researched this TODAY and got it working TODAY.
Sweet that I can click in the background now
Also thanks to @Tisako and @Kurama<3 for inspiring me to take a look at it again after quite a few months and tons of experience gained.
Quote Originally Posted by phj280600 View Post
I researched this TODAY and got it working TODAY.
Sweet that I can click in the background now
Also thanks to @Tisako and @Kurama<3 for inspiring me to take a look at it again after quite a few months and tons of experience gained.
Good thing you did it.
If you want, you can lay out the code so that other users can use it.

I know that it’s enough to use:
WM_MOUSEACTIVATE (possible without it, sort of) | WM_ACTIVATE
WM_SETCURSOR | WM_MOUSEMOVE | WM_LBUTTON+DOWN / UP
Or be 5Head like me and make a mod that will skip all dialogs.Aka accept everything
could you share cod with us too?
Quote Originally Posted by Joca. View Post
Or be 5Head like me and make a mod that will skip all dialogs.Aka accept everything
Could you tell me what mod it is?
Quote Originally Posted by jkazn2000 View Post
Could you tell me what mod it is?
It's probably not a released mod but it's as simple as a single line of code in the messagedialog swf file that calls ExternalInterface.call("MESSAGEDIALOG.RESPONSE",0) ;
That will trigger the dialog response ok whenever the message is set essentially skipping it.
Quote Originally Posted by phj280600 View Post
It's probably not a released mod but it's as simple as a single line of code in the messagedialog swf file that calls ExternalInterface.call("MESSAGEDIALOG.RESPONSE",0) ;
That will trigger the dialog response ok whenever the message is set essentially skipping it.
Ah, thank you
Quote Originally Posted by jkazn2000 View Post
Ah, thank you
Although you might not wanna do that as it will skip all dialog if placed in the setMessage.

Take a look at ExoDave's Better Invites mod implementation of only skipping some dialogs.

private function setMessage(param1:String) : void
{
this.message = param1;
var _loc2_:* = new Array();
_loc2_[0] = "for a price of";
_loc2_[1] = "Gem Booster Box\'";
_loc2_[2] = "Re-Gemerator\'";
_loc2_[3] = "completed";
_loc2_[4] = "Dragon Coins";
var _loc3_:* = 0;
while(_loc3_ < _loc2_.length)
{
if(this.message.toLowerCase().indexOf(_loc2_[_loc3_].toLowerCase()) > 0)
{
_loc3_ = _loc2_.length;
ExternalInterface.call("MESSAGEDIALOG.RESPONSE",0) ;
}
_loc3_++;
}
if(this.message.length < 90)
{
this.messageTextField.y = -65;
}
}
WOW that is awesome. Thanks a ton. I tried so long on a few sites trying to find out how. Clickdrag on background was impossible to find!!
Posts 115 of 18 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?