Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    Corntoast's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Chew&Swallows
    Posts
    212
    Reputation
    10
    Thanks
    12

    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.
    Last edited by Corntoast; 05-29-2011 at 11:27 PM.
    Dont Hate. Cuz

  2. #2
    omagad00's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    48
    Reputation
    19
    Thanks
    60
    My Mood
    Tired
    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
    ...
    Last edited by omagad00; 05-29-2011 at 07:54 PM.

  3. #3
    Corntoast's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Chew&Swallows
    Posts
    212
    Reputation
    10
    Thanks
    12
    *Edit*

    Deleted comment, Sorry for the PMSing.
    Last edited by Corntoast; 05-30-2011 at 12:11 AM. Reason: Ignoriance
    Dont Hate. Cuz

  4. #4
    omagad00's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    48
    Reputation
    19
    Thanks
    60
    My Mood
    Tired
    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.

  5. #5
    DanK's Avatar
    Join Date
    Aug 2006
    Gender
    male
    Location
    Arizona
    Posts
    2,892
    Reputation
    100
    Thanks
    3,632
    My Mood
    Devilish
    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

  6. #6
    Corntoast's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Chew&Swallows
    Posts
    212
    Reputation
    10
    Thanks
    12
    That is exactly what i mean, can u explain what those specifically do?
    If its not too much trouble.
    Dont Hate. Cuz

  7. #7
    riceking's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    b
    Posts
    478
    Reputation
    12
    Thanks
    301
    My Mood
    Amazed
    Control send sends to to a window specifically rather than a general keypress.


    [img]https://i37.photobucke*****m/albums/e52zies/Rainbow.png?[/img]


  8. #8
    omagad00's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    48
    Reputation
    19
    Thanks
    60
    My Mood
    Tired
    Quote Originally Posted by nunya 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.

  9. #9
    auggie246's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    136
    Reputation
    10
    Thanks
    56
    Quote Originally Posted by omagad00 View Post
    No, it was something I found on the Internet to test and that I forgot to delete.
    @nunya

    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

  10. #10
    Corntoast's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Chew&Swallows
    Posts
    212
    Reputation
    10
    Thanks
    12
    So $Windows isnt needed to choose the minimized vindictus?
    Since the updated AutoIT?

    Strange, everyone i looked on google it said we needed it.
    Dont Hate. Cuz

  11. #11
    DanK's Avatar
    Join Date
    Aug 2006
    Gender
    male
    Location
    Arizona
    Posts
    2,892
    Reputation
    100
    Thanks
    3,632
    My Mood
    Devilish
    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.

  12. #12
    Corntoast's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Chew&Swallows
    Posts
    212
    Reputation
    10
    Thanks
    12
    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.
    Dont Hate. Cuz

  13. #13
    buzzzboy's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    134
    Reputation
    10
    Thanks
    2
    My Mood
    Relaxed
    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?
    Last edited by buzzzboy; 05-29-2011 at 11:39 PM.

  14. #14
    Corntoast's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Chew&Swallows
    Posts
    212
    Reputation
    10
    Thanks
    12
    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.
    Dont Hate. Cuz

  15. #15
    omagad00's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    48
    Reputation
    19
    Thanks
    60
    My Mood
    Tired
    Quote Originally Posted by nunya 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?
    Last edited by omagad00; 05-29-2011 at 11:42 PM.

Page 1 of 2 12 LastLast