HelpBackround feature on AutoIT.

Posts 1–15 of 27 · Page 1 of 2
Backround feature on AutoIT.
As posted in Blood Lord AutoIT Background Compatibility

Someone was able to make it background compatible.

Since i already have a custom autoIT code i don't want to use his and have to get all new binds/hfs files for it.

Can anyone explain to me how he made it work in minimized mode? I already tried to investigate my self but i'm still not figuring it out.

Thanks in advance.
Well, it's not "windowed", it's minimized.. but whatever. And be sure your vindictus is set to Custom>FullScreen !

You just have to replace the code (in red) by your code:
...

Func BloodLord()
$timer = TimerInit()
While 1
If($show) then
$diff = Int(TimerDiff($timer) / 1000)
ToolTip("Run #" & $run & " - Money: ~" & $money & " - Time running: " & Time($diff), 0, 0)
EndIf
ControlClick("Vindictus", "", "", "left", 3, 108, 910) ; Start
ControlSend("Vindictus", "", "", "{Numpad6}") ; <host_timescale 3>
Sleep(8000)
ControlSend("Vindictus", "", "", "{NUMPADSUB}") ; Changelevel
Sleep(7000)
ControlSend("Vindictus", "", "", "{Numpad6}") ; <host_timescale 3>
Sleep(500)
ControlSend("Vindictus", "", "", "{F6}") ; Transform - F7 = PALADIN
Sleep(500)
ControlSend("Vindictus", "", "", "{0}") ; <sticky_bomb 999>
Sleep(500)
ControlSend("Vindictus", "", "", "{w down}") ; Move forward 2 seconds
Sleep(2000)
ControlSend("Vindictus", "", "", "{w up}") ; Stop
Sleep(9000)
ControlSend("Vindictus", "", "", "f") ; Sticky bomb out
Sleep(500)
ControlSend("Vindictus", "", "", "e") ; Throw
Sleep(500)
ControlSend("Vindictus", "", "", "{7}") ; <fine_bomb 999>
Sleep(5000)
ControlSend("Vindictus", "", "", "f") ; Fine bomb out
Sleep(500)
ControlSend("Vindictus", "", "", "e") ; Throw
Sleep(2000)
ControlSend("Vindictus", "", "", "f") ; Fine bomb out -- in case
Sleep(500)
ControlSend("Vindictus", "", "", "e") ; Throw
Sleep(2000)
ControlSend("Vindictus", "", "", "f") ; Fine bomb out -- in case.. sometimes it takes 3!
Sleep(500)
ControlSend("Vindictus", "", "", "e") ; Throw
Sleep(67000) ; Window appear
ControlClick("Vindictus", "", "", "left", 3, 195, 705) ; Replay
Sleep(12000) ; Going to the boat

$run += 1
$money += 20000
WEnd
EndFunc
...
*Edit*

Deleted comment, Sorry for the PMSing.
Well, calm down and don't be rude if you want some help.

If you want to run it in background, you need to use ControlSend & ControlClick (not Send & MouseClick), that's pretty much it. AutoIT docs will help you.

And yes, what I highlighted is the whole part of the background setting.
Quote Originally Posted by omagad00 View Post
Well, calm down and don't be rude if you want some help.

If you want to run it in background, you need to use ControlSend & ControlClick (not Send & MouseClick), that's pretty much it. AutoIT docs will help you.

And yes, what I highlighted is the whole part of the background setting.
I was under the impression it needed this
Code:
Func _MouseClickPlus($Window, $Button = "left", $X = "", $Y = "", $Clicks = 1)
	Local $MK_LBUTTON = 0x0001
	Local $WM_LBUTTONDOWN = 0x0201
	Local $WM_LBUTTONUP = 0x0202
	Local $MK_RBUTTON = 0x0002
	Local $WM_RBUTTONDOWN = 0x0204
	Local $WM_RBUTTONUP = 0x0205
	Local $WM_MOUSEMOVE = 0x0200
	Local $i = 0

	Select
	 Case $Button = "left"
	  $Button = $MK_LBUTTON
	  $ButtonDown = $WM_LBUTTONDOWN
	  $ButtonUp = $WM_LBUTTONUP
	 Case $Button = "right"
	  $Button = $MK_RBUTTON
	  $ButtonDown = $WM_RBUTTONDOWN
	  $ButtonUp = $WM_RBUTTONUP
	EndSelect

	If $X = "" OR $Y = "" Then
	 $MouseCoord = MouseGetPos()
	 $X = $MouseCoord[0]
	 $Y = $MouseCoord[1]
	EndIf

	For $i = 1 to $Clicks
	 DllCall("user32.dll", "int", "SendMessage", "hwnd", WinGetHandle($Window), "int", $WM_MOUSEMOVE, "int", 0, "long", _MakeLong($X, $Y))
	 DllCall("user32.dll", "int", "SendMessage", "hwnd", WinGetHandle($Window), "int", $ButtonDown, "int", $Button, "long", _MakeLong($X, $Y))
	 DllCall("user32.dll", "int", "SendMessage", "hwnd", WinGetHandle($Window), "int", $ButtonUp, "int", $Button, "long", _MakeLong($X, $Y))
	Next
EndFunc

Func _MakeLong($LoWord,$HiWord)
	Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF))
EndFunc
Quote Originally Posted by DanK View Post
I was under the impression it needed this
Code:
Func _MouseClickPlus($Window, $Button = "left", $X = "", $Y = "", $Clicks = 1)
	Local $MK_LBUTTON = 0x0001
	Local $WM_LBUTTONDOWN = 0x0201
	Local $WM_LBUTTONUP = 0x0202
	Local $MK_RBUTTON = 0x0002
	Local $WM_RBUTTONDOWN = 0x0204
	Local $WM_RBUTTONUP = 0x0205
	Local $WM_MOUSEMOVE = 0x0200
	Local $i = 0

	Select
	 Case $Button = "left"
	  $Button = $MK_LBUTTON
	  $ButtonDown = $WM_LBUTTONDOWN
	  $ButtonUp = $WM_LBUTTONUP
	 Case $Button = "right"
	  $Button = $MK_RBUTTON
	  $ButtonDown = $WM_RBUTTONDOWN
	  $ButtonUp = $WM_RBUTTONUP
	EndSelect

	If $X = "" OR $Y = "" Then
	 $MouseCoord = MouseGetPos()
	 $X = $MouseCoord[0]
	 $Y = $MouseCoord[1]
	EndIf

	For $i = 1 to $Clicks
	 DllCall("user32.dll", "int", "SendMessage", "hwnd", WinGetHandle($Window), "int", $WM_MOUSEMOVE, "int", 0, "long", _MakeLong($X, $Y))
	 DllCall("user32.dll", "int", "SendMessage", "hwnd", WinGetHandle($Window), "int", $ButtonDown, "int", $Button, "long", _MakeLong($X, $Y))
	 DllCall("user32.dll", "int", "SendMessage", "hwnd", WinGetHandle($Window), "int", $ButtonUp, "int", $Button, "long", _MakeLong($X, $Y))
	Next
EndFunc

Func _MakeLong($LoWord,$HiWord)
	Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF))
EndFunc
No, it was something I found on the Internet to test and that I forgot to delete.
Quote Originally Posted by omagad00 View Post
No, it was something I found on the Internet to test and that I forgot to delete.
@DanK

yes there is no need to use that part, that was for old AUTOIT, where there is no controlclick/send

now that u can controlclick and send, there is no need to have that part
That is exactly what i mean, can u explain what those specifically do?
If its not too much trouble.
Control send sends to to a window specifically rather than a general keypress.
So $Windows isnt needed to choose the minimized vindictus?
Since the updated AutoIT?

Strange, everyone i looked on google it said we needed it.
Just wish I could find a way to use it with FullScreenMode rather then custom fullscreen, so I could monitor it easier.. With custom fullscreen if I try to alt-tab to check on it it lags it out a couple seconds and makes it fail anyways.
a way to check to see if it's still working is if your mouse keeps going to the top corner of your screen (that's what mine does anyways). If the bot is somehow stuck, your mouse should not do that anymore.

For me, I just minimize first then start bot so there's really no lag. It works fine with my old sleep times.

Quote Originally Posted by Corntoast View Post
Thats why i want to figure out how it works.

I don't want to change my resolution and rebind everything + add new hfs and crap just to use someone elses bot that probably glitches out every few hours.
you're asking for help but you're not even reading the posts. it's already been said, all you need to do is replace send and mouseclick with controlsend and controlclick and those ","" extra parameters. Just copy and paste that part from what omagad gave you...just think and compare...what is different from your codes and apply.

btw @omagad00 what happened to your thread? it got deleted?
Quote Originally Posted by buzzzboy View Post
you're asking for help but you're not even reading the posts. it's already been said, all you need to do is replace send and mouseclick with controlsend and controlclick and those ","" extra parameters. Just copy and paste that part from what omagad gave you...just think and compare...what is different from your codes and apply.
Strange, but when i tried to test it with those first Controlsend/ControlClick it didn't work minimized, it still moves the mouse around and doesn't control vindictus...
unless that's what its supposed to do.
Quote Originally Posted by DanK View Post
Just wish I could find a way to use it with FullScreenMode rather then custom fullscreen, so I could monitor it easier.. With custom fullscreen if I try to alt-tab to check on it it lags it out a couple seconds and makes it fail anyways.
Just add a "pause" option, pause before alt+tab, unpause after.


Quote Originally Posted by Corntoast View Post
Strange, but when i tried to test it with those first Controlsend/ControlClick it didn't work minimized, it still moves the mouse around and doesn't control vindictus...
unless that's what its supposed to do.
You know that ControlClick("The title of the window to access", "", "", "left"..) right?
Thats why i want to figure out how it works.

I don't want to change my resolution and rebind everything + add new hfs and crap just to use someone elses bot that probably glitches out every few hours.
Posts 1–15 of 27 · Page 1 of 2
This thread is closed for replies.

Tags

None

Talk with us