MSLx Fanboy Posted May 20, 2005 Share Posted May 20, 2005 I'm trying to finish up the Tic-Tac-Toe game I've been working on for the last day or so, but I've finally come to a complete brick wall. Currently, if you play against the computer, the computer will generate a button of a number, and return with the ControlID of the button it wants to press. The problem is, I can't figure out how to send a message to GUIGetMsg() saying that it wants to be pressed. The other problem is, if it draws near to a stalemate, it errors out saying that the recursion level has exceeded (if the button is pressed, the function is run again, I can change to a while loop if necessary). Any help will be GREATLY appreciatedTic_Tac_Toe.au3 Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
GaryFrost Posted May 20, 2005 Share Posted May 20, 2005 Func BotTurn() Local $numgen = Random(0, 8, 1) While $buttons[$numgen] == 1 $numgen = Random(0, 8, 1) WEnd $botturn = $buttons[$numgen] ControlClick ( "Tic-Tac-Toe", "", $CtrlButtons[$numgen] ) EndFunc;==>BotTurn SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted May 20, 2005 Author Share Posted May 20, 2005 Thanks! Huh, I can't believe I didn't think of that Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) 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