Jump to content

Join our Slack

Talk to other users and have a great time
Slack Server

Welcome to our Community

Click here to get your Exiled Bot license
Donation Store
Sign in to follow this  
godre

please help TO WORK SCRIPT IN INACTIVE WINDOW

Recommended Posts

WORKS IN 2.4  with AHK  IN ACTIVE WINDOW ... PLEASE HELP TO EDIT IT TO WORK IN BACKGROUND PLEASE SOMEONE !! 

script 

 

 

 

#If Path of Exile

 

Macro1:

Loop

{

    Loop

    {

        WinActivate, Path of Exile ahk_class Direct3DWindowClass

        Sleep, 333

        Sleep, 2652

        Send, {Enter}

        Sleep, 1170

        Send, {Backspace}

        Sleep, 593

        Send, {/}

        Sleep, 390

        Send, {t}

        Sleep, 234

        Send, {r}

        Sleep, 172

        Send, {a}

        Sleep, 171

        Send, {d}

        Sleep, 188

        Send, {e}

        Sleep, 1232

        Send, {Space}

        Sleep, 203

        Send, {1}

        Sleep, 234

        Send, {Enter}

        Sleep, 733

        Send, {Enter}

        Sleep, 1544

        Send, {Up}

        Sleep, 406

        Send, {Up}

        Sleep, 749

        Send, {Enter}

        Sleep, 749

        Send, {Enter}

        Sleep, 546

        Send, {Up}

        Sleep, 327

        Send, {Up}

        Sleep, 640

        Send, {Backspace}

        Sleep, 312

        Send, {2}

        Sleep, 312

        Send, {Enter}

        Sleep, 764

        Send, {Enter}

        Sleep, 515

        Send, {Up}

        Sleep, 343

        Send, {Up}

        Sleep, 359

        Send, {Enter}

        Sleep, 733

        Send, {Enter}

        Sleep, 718

        Send, {Up}

        Sleep, 452

        Send, {Up}

        Sleep, 671

        Send, {Backspace}

        Sleep, 312

        Send, {3}

        Sleep, 296

        Send, {Enter}

        Sleep, 968

        Send, {Enter}

        Sleep, 592

        Send, {Up}

        Sleep, 406

        Send, {Up}

        Sleep, 577

        Send, {Enter}

        Sleep, 1108

        Send, {Enter}

        Sleep, 624

        Send, {Up}

        Sleep, 265

        Send, {Up}

        Sleep, 733

        Send, {Backspace}

        Sleep, 375

        Send, {4}

        Sleep, 390

        Send, {Enter}

        Sleep, 982

        Send, {Enter}

        Sleep, 609

        Send, {Up}

        Sleep, 296

        Send, {Up}

        Sleep, 702

        Send, {Enter}

        Sleep, 905

        Send, {Enter}

        Sleep, 3479

        Send, {Up}

        Sleep, 452

        Send, {Up}

        Sleep, 624

        Send, {Backspace}

        Sleep, 687

        Send, {5}

        Sleep, 312

        Send, {Enter}

        Sleep, 1326

        Send, {Enter}

        Sleep, 515

        Send, {Up}

        Sleep, 327

        Send, {Up}

        Sleep, 499

        Send, {Enter}

        Sleep, 936

        Send, {Enter}

        Sleep, 1404

        Send, {Up}

        Sleep, 344

        Send, {Up}

        Sleep, 655

        Send, {Backspace}

        Sleep, 468

        Send, {6}

        Sleep, 281

        Send, {Enter}

        Sleep, 1388

        Send, {Enter}

        Sleep, 1123

        Send, {Up}

        Sleep, 453

        Send, {Up}

        Sleep, 592

        Send, {Enter}

        Sleep, 952

        Send, {Enter}

        Sleep, 858

        Send, {Up}

        Sleep, 328

        Send, {Up}

        Sleep, 717

        Send, {Backspace}

        Sleep, 515

        Send, {7}

        Sleep, 1076

        Send, {Enter}

        Sleep, 827

        Send, {Enter}

        Sleep, 562

        Send, {Up}

        Sleep, 343

        Send, {Up}

        Sleep, 562

        Send, {Enter}

    }

}

Return

 

#If

 

F8::ExitApp

 

Share this post


Link to post
Share on other sites

Something like this should work:

(not tested though!)

Spoiler
#NoEnv
#Persistent
#SingleInstance, force
SendMode Input
SetWorkingDir %A_ScriptDir%
SetBatchLines, -1
DetectHiddenWindows, On

; Global variables:
cliname := "Path of Exile"
MaxChannels := 7

; Some more preparations
WinGet, WinID, List, %cliname%
Loop, %WinID%
{
	WinGet, ProcModuleName, ProcessName,  % "ahk_id" WinID%A_Index%
	If (ProcModuleName = "PathOfExileSteam.exe") {
		cliexe	:= "PathOfExileSteam.exe"
		break
	} Else If (ProcModuleName = "PathOfExile.exe") {
		cliexe	:= "PathOfExile.exe"
		break
	}
}
POEHWND := GetHwnd(cliname, cliexe)

; TradeSpam Macro
Macro1:
	Loop
	{
		Loop, %MaxChannels%
		{
			SetKeyDelay, random(50, 70), random(10, 30)
			ControlSend,,{NumpadEnter}, % "ahk_id" POEHWND
			RandomSleep(35, 75)
			ControlSendRaw,,% "/trade " . A_Index, % "ahk_id" POEHWND
			RandomSleep(35, 75)
			ControlSend,,{NumpadEnter}, % "ahk_id" POEHWND
			RandomSleep(95, 125)
		}
	}
Return

; additional functions:
GetHwnd(process, exename)
{
	If WinExist(process) {
		WinGet, WinID, List, %process%
		Loop, %WinID% {
			WinGet, ProcModuleName, ProcessName, % "ahk_id" WinID%A_Index%
			If(ProcModuleName=exename) {
				If (WinID%A_Index%=WinActive("A"))
					ThisID:=WinActive("A")
				return WinID%A_Index%
			}
		}
	} else
		return false
}

randomSleep(msMin, msMax)
{
	Global SendDelay
	Random, out, % msMin + SendDelay, % msMax + SendDelay
	sleep, %out%
}

random(min, max)
{
	Random, out, %min%, %max%
	return out
}

F8::ExitApp

Share this post


Link to post
Share on other sites

Something like this should work:

(not tested though!)

Spoiler
#NoEnv
#Persistent
#SingleInstance, force
SendMode Input
SetWorkingDir %A_ScriptDir%
SetBatchLines, -1
DetectHiddenWindows, On

; Global variables:
cliname := "Path of Exile"
MaxChannels := 7

; Some more preparations
WinGet, WinID, List, %cliname%
Loop, %WinID%
{
	WinGet, ProcModuleName, ProcessName,  % "ahk_id" WinID%A_Index%
	If (ProcModuleName = "PathOfExileSteam.exe") {
		cliexe	:= "PathOfExileSteam.exe"
		break
	} Else If (ProcModuleName = "PathOfExile.exe") {
		cliexe	:= "PathOfExile.exe"
		break
	}
}
POEHWND := GetHwnd(cliname, cliexe)

; TradeSpam Macro
Macro1:
	Loop
	{
		Loop, %MaxChannels%
		{
			SetKeyDelay, random(50, 70), random(10, 30)
			ControlSend,,{NumpadEnter}, % "ahk_id" POEHWND
			RandomSleep(35, 75)
			ControlSendRaw,,% "/trade " . A_Index, % "ahk_id" POEHWND
			RandomSleep(35, 75)
			ControlSend,,{NumpadEnter}, % "ahk_id" POEHWND
			RandomSleep(95, 125)
		}
	}
Return

; additional functions:
GetHwnd(process, exename)
{
	If WinExist(process) {
		WinGet, WinID, List, %process%
		Loop, %WinID% {
			WinGet, ProcModuleName, ProcessName, % "ahk_id" WinID%A_Index%
			If(ProcModuleName=exename) {
				If (WinID%A_Index%=WinActive("A"))
					ThisID:=WinActive("A")
				return WinID%A_Index%
			}
		}
	} else
		return false
}

randomSleep(msMin, msMax)
{
	Global SendDelay
	Random, out, % msMin + SendDelay, % msMax + SendDelay
	sleep, %out%
}

random(min, max)
{
	Random, out, %min%, %max%
	return out
}

F8::ExitApp

 immo  you are genius. But it didnt work ... i love you trade spam macro but it is now working in 2.4  that is why i decied to figure out somehting by myself... thank you for you effort but  i tried ur marco and it didnt work ...   What is need to do is to manualu link items to trade  chat and marco would run on back ground or inactive window. please try to test the marco that you wrote for me .. or just ur trade spam mate to 2.4) 

Share this post


Link to post
Share on other sites

...or >just< ur trade spam mate to 2.4

 

Yeah, "just" ^^

 

First of all, I do not play poe any longer since at least 1.5years. I do not even have an up-to-date client installed. :D

 

Anyway, to be honest, I just had some hours of spare time and was bored, so I gave updating TradeSpam a try...

This is what I came up with: tradespam.v6.2.zip

 

As far as I can see, it is working for me.

 

!BUT!

  • This does not automatically mean that it is working for every user!
  • If there are bigger issues with this version, it might be possible that I am not going to fix em... or it could again take 1.5years!
  • I did not heavily test this release, so expect issues!

Nevertheless, hopefully, it is working for you guys. If so, enjoy it as long as it lasts.

I am expecting feedback!

Edited by immo

Share this post


Link to post
Share on other sites

Yeah, "just" ^^

 

First of all, I do not play poe any longer since at least 1.5years. I do not even have an up-to-date client installed. :D

 

Anyway, to be honest, I just had some hours of spare time and was bored, so I gave updating TradeSpam a try...

This is what I came up with: attachicon.giftradespam.v6.2.zip

 

As far as I can see, it is working for me.

 

!BUT!

  • This does not automatically mean that it is working for every user!
  • If there are bigger issues with this version, it might be possible that I am not going to fix em... or it could again take 1.5years!
  • I did not heavily test this release, so expect issues!

Nevertheless, hopefully, it is working for you guys. If so, enjoy it as long as it lasts.

I am expecting feedback!

IMMO   Please make a trade spam for 2.5    AOB scan is not working   neither trade  chat spam  or SOMETHING THAT would work in background  window . Cant study for my finals because of this problem ))

Edited by godre

Share this post


Link to post
Share on other sites
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.

#Persistent ; Only the user can kill the application

SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.

StringCaseSense, On ; Match strings with case.

SetWorkingDir %A_ScriptDir%

CoordMode, ToolTip, Relative

CoordMode, Mouse, Screen

#MaxThreadsPerHotkey 2

 

; User config

_tcaStart = F5 ; Hotkey to start advertising

_tcaPause = F6 ; Hotkey to pause advertising

_tcaExit = F8 ; Hotkey to exit script

 

_chans = 8 ; Number of tradechannels you want to advertise at

 

; Internal config

_scriptName = Magic.Tradechannel.Spam

_scriptVer = v1.2

endchan := (_chans + 1)

 

; linking Hotkeys

Hotkey, %_tcaStart%, tcaStart

Hotkey, %_tcaPause%, tcaPause

Hotkey, %_tcaExit%, tcaExit

 

; poor method of "stopping" the script

^!F9::

 

; main Tradescript for advertising in an array of Tradechannels.

tcaStart:

; checking if PoE is the active window

WinActivate, Path of Exile

#IfWinActive Path of Exile

TrayTip, Executing the Tradechannel advertisement! , This may take some seconds!`n`n%_scriptName%.%_scriptVer%, 2

 

; poor try to remove an active chatmessage...

WinGetPos, XStart, YStart, Width, Height, Path of Exile

XPos := XStart+(Width/2)

YPos := YStart+(Height/2)

Mousemove %XPos%, %YPos%

Sleep, % Random(225,275)

click

Sleep, % Random(225,275)

SendInput, {SPACE}

Sleep, % Random(25,75)

 

; main loop

Loop

{

  if a_index > %_chans%

break

  Sleep, % Random(700,575)

  ControlSend,, {Enter}

  Sleep, % Random(700,975)

  ControlSend,, {/}trade %a_index%

  Sleep, % Random(700,975)

  ControlSend,, {Enter}

  Sleep, % Random(700,975)

  ControlSend,, {Enter}

  Sleep, % Random(700,975)

  ControlSend,, {UP}{UP}

  Sleep, % Random(700,975)

  ControlSend,, {Enter}

}

return

 

; randomization

Random(min,max) {

Random, out, %min%, %max%

return out

}

 

; Simple Pause/Unpause Function

tcaPause:

if A_IsPaused

{

Pause off

TrayTip, resuming %_scriptName%.%_scriptVer%!, `nPress %_tcaPause% to pause Script again... , 1, 2

}

else

{

TrayTip, %_scriptName%.%_scriptVer% paused!, `nPress %_tcaPause% to resume script... , 1, 2

Pause On


return

 

; simple exit routine

tcaExit:

Sleep, % Random(75,125)

TrayTip, , >> Terminating %_scriptName%.%_scriptVer%! <<, 2

Sleep, % Random(775,1225)

exitapp

return

 

 

 

This seems to do the trick with trade chat but it stops after chan 9 ... how can i make it run from chan 1 to 8 in infinite loop ?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...