Newpie Posted October 29, 2011 Share Posted October 29, 2011 Hiya, My first time scriptin' here. Could anyone help me with my script? It keeps complaining that, well, the topic says it all. expandcollapse popup$i = 1 While $i = 1 Sleep(1500) MouseMove(925, 486, 1) MouseClick("left") Sleep(4000) $coord = PixelSearch(997, 514, 1051, 567, 0x0000FF) If Not @error Then MouseMove(979, 448, 1) MouseClick("left") Sleep(4000) $coord = PixelSearch(777, 230, 897, 282, 0x0000FF) If Not @error Then MouseMove(779, 363, 1) MouseClick("left") Sleep(4000) $coord = PixelSearch(642, 466, 745, 555, 0x0000FF) If Not @error Then MouseMove(607, 358, 1) MouseClick("left") Sleep(4000) $coord = PixelSearch(391, 228, 597, 289, 0x0000FF) If Not @error Then $i = 2 Else MouseMove(1027, 633) MouseClick("left") Sleep(1500) MouseClick("left") Else MouseMove(1027, 633) MouseClick("left") Sleep(1500) MouseClick("left") Else MouseMove(1027, 633) MouseClick("left") Sleep(1500) MouseClick("left") Else MouseMove(1027, 633) MouseClick("left") Sleep(1500) MouseClick("left") WEnd The idea is to make a unique record at virtual Minigolf. First it hits the ball, checks if it's at the right place (due to randomness, the place varies a lot), and repeats. If it's not at the right place, it double clicks a certain spot to start a new game, and repeats the whole script. When it finally gets those hits right, the script stops ($i = 2). So, any ideas? (I hope the color code is right, pure blue or something.) Link to comment Share on other sites More sharing options...
Developers Jos Posted October 29, 2011 Developers Share Posted October 29, 2011 Load the full SciTE4AutoIt3 installer and run your script through Tidy (Ctrl+T from within SciTE) This will show what is wrong. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
hannes08 Posted October 29, 2011 Share Posted October 29, 2011 Hi Newpie, also read the forum rules, as discussing automation of games is not permitted on these forums. Thread reported. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
Recommended Posts