Arez Posted April 4, 2006 Share Posted April 4, 2006 (edited) So far I have this code: If WinExists ("Diablo II") Then WinActivate ("Diablo II") WinWaitActive ("Diablo II") $WinPos = WinGetPos ("Diablo II") Sleep(595) Send("{ESC}") Else Exit EndIf How would I make that come up with an error message saying, "Game not found" or something like that instead of excecuting the code if diablo II wasn't open? thanks Edited April 4, 2006 by Arez Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted April 4, 2006 Share Posted April 4, 2006 (edited) hmm try my script If WinExists("Diablo II") Then HotKeySet("{Space}", "close") Else MsgBox(64, "Info", "The game isn´t running!") Exit(0) EndIf Func Close() Send("!{F4}") EndFunc While 1 Sleep(100) WEnd this was meant for hardcore if space is hit it exits right out of the game if that gives you a idea Edited April 4, 2006 by Evil_Has_Survived Thanks in advance Link to comment Share on other sites More sharing options...
Arez Posted April 4, 2006 Author Share Posted April 4, 2006 I am dumb and don't understand how to put that in my script. HELP Link to comment Share on other sites More sharing options...
greenmachine Posted April 5, 2006 Share Posted April 5, 2006 I am dumb and don't understand how to put that in my script. HELPCopy and paste..... Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted April 5, 2006 Share Posted April 5, 2006 I am dumb and don't understand how to put that in my script. HELP so say ............. ............. ............. ............. see the dots just say thats the script ok step 1 highlight it (not to hard right ok) step 2 rightclick step 3 copy step 4 open autoit script step 5 edit step 6 paste easy steps or step 1 highlight step 2 hold ctrl and c at the same time step 3 open autoit script step 4 ctrl and hold v at the same time or step 6 edit,,, paste Thanks in advance Link to comment Share on other sites More sharing options...
greenmachine Posted April 5, 2006 Share Posted April 5, 2006 If WinExists ("Diablo II") Then HotKeySet("{Space}", "close") WinActivate ("Diablo II") WinWaitActive ("Diablo II") $WinPos = WinGetPos ("Diablo II") Sleep(595) Send("{ESC}") Else MsgBox(64, "Info", "The game isn´t running!") Exit EndIf Func Close() Send("!{F4}") EndFunc While 1 Sleep(100) WEnd That's really all there is to it.... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now