Jump to content
Sign in to follow this  
mrfloppi

AutoIt3 + Warhammer + controlSend

Recommended Posts

mrfloppi

Hi everybody,

i was bored with my Choppa today and thought itd be a good idea to just let a bot go level for me, so i checken out autoit and made a real basic bot, very simple and all... Well, i figured it worked out quite nicely for me, ill just post the code i put in the script right here, so u people see what im trying to do. Script is real basic and nothing special, i know.

HotKeySet("{F9}", "endthis")

$answer = MsgBox(4, "Choppa Level Bot", "rdy?")

AutoItSetOption ("WinTitleMatchMode",2)

If $answer = 7 Then

MsgBox(0, "Byebye", "cya!")

Exit

EndIf

$count = 0

Do

botFuncChoppa()

Until $count > 0

Exit

Func botFuncChoppa()

WinWaitActive("Warhammer")

Send("{TAB}");

Sleep(1000);

WinWaitActive("Warhammer")

Send("0");

Sleep(1000);

WinWaitActive("Warhammer")

Send("0");

Sleep(1000);

WinWaitActive("Warhammer")

Send("1");

Sleep(1000);

WinWaitActive("Warhammer")

Send("1");

Sleep(1000);

~~~~~~~ (and so on and so on) ~~~~~~~~~~~

Send("2");

Sleep(1000);

WinWaitActive("Warhammer")

Send("2");

Sleep(1000);

WinWaitActive("Warhammer")

Send("2");

Sleep(15000);

EndFunc

Func endthis()

Exit

EndFunc

So what im basically doing is pressing tab ( next enemy ) and then throw my axe at him... followed by several attacks and so on and so on... Now... i know theres a way to send controls to a minimized window via controlSend() function... but i just couldnt get it to work with my bot right here, its just not doing anything.

Now what i tried looked something like this:

$handle = WinGetHandle("Warhammer")

ControlSend($handle,"","","2")

And that like in all kinds of variations i could think of... with controlFocus() ... googled stuff up too, but couldnt get it to work... Also read the thread posted here earlier, but it didnt really work out for me...

So now.. is there anybody out there who could provide me some help right here? I just need some code snippet that works or a little advice

thanks in advance

danny

Share this post


Link to post
Share on other sites
mrfloppi

nope, doesnt react at all.

I just thought that might be some kind of security thing... so that u are not allowed to do any input while the window isnt focused and maximized...

Well... any other suggestions?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.