Jump to content

Recommended Posts

Posted

Can soemone tell me a code on how i can keep a window open even if they click off the window?

I'm making a bot for diablo ii and i want to put a code in my bot if they click off the screen it will bring the window back up so it doesn't error on them, open any other programs, etc.

Posted

lets see the code.

heres an easy solution

while 1
if not winactive("Diablo II") then
winactivate("Diablo II")
endif
wend

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Posted

Do
Sleep (5000)
Send("{ENTER}")
Sleep (1000)
Send("{!}" & "Bot has been running:: " & $Loops & ", ::Minute(s)." & "{!}")
Send("{ENTER}")
Sleep (54000)
$Loops = $Loops + 1
Until $Loops = -1
Exit

Thats my code, and i wanted it if somehow say a AOL messege pops up, it would bring back up the D2 window so nothing is harmed or whatever.

Posted

How would i use it in my while loop, at the begining or end? I'm completely puzzled on this part of my coding.

Outside the loop, before you enter your Do/While loop.

It may or may not work for you, what it will do is force the window to remain always on top, but that may not mean it is always active. Also, if another window pops up that also has a "always on top" attribute, it may override your window.

-DRX
Posted (edited)

I used t0ddie's little script he gave me, and it seems to work fine for me, before it types every time it checks to make sure d2 is active.

Do
Sleep (5000)

if not winactive("Diablo II") then
winactivate("Diablo II")
endif

Send("{ENTER}")
Sleep (1000)
Send("{!}" & "Bot has been running:: " & $Loops & ", ::Minute(s)." & "{!}")
Send("{ENTER}")
Sleep (54000)
$Loops = $Loops + 1
Until $Loops = -1
Exit

Thank you all! :P

Edited by Godownage

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
×
×
  • Create New...