Vindicator209 Posted October 9, 2006 Share Posted October 9, 2006 I have a game which title changes by day (Welcome to Demonica! you are on day: 23 of your quest) how could I make a script that would try every number between 1 - 50? WinWaitClose("Welcom to Demonica! You are on day: "&$num&" of your quest)") how could I deal with $num? I though I could use a loop but that failed... [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 9, 2006 Moderators Share Posted October 9, 2006 (edited) I have a game which title changes by day (Welcome to Demonica! you are on day: 23 of your quest) how could I make a script that would try every number between 1 - 50? WinWaitClose("Welcom to Demonica! You are on day: "&$num&" of your quest)") how could I deal with $num? I though I could use a loop but that failed...Rather a basic question wouldn't you say?For $i = 1 To 50 ToolTip('You are on number: ' & $i, 0, 0) Sleep(500) NextoÝ÷ ØGb´(º^¡ù¨ë(ʦmmæëh¶¬¦+bÞ¡ûayìZ^jëh×6 $nCount = 0 While $nCount < 50 $nCount += 1 ToolTip('You are on number: ' & $nCount, 0, 0) Sleep(200) WEnd $nCount = 0 Do $nCount += 1 ToolTip('You are on number: ' & $nCount, 0, 0) Sleep(200) Until $nCount >= 50 Edited October 9, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Vindicator209 Posted October 9, 2006 Author Share Posted October 9, 2006 how dare you question my stupidity =D j/k thanks..ive never seen anything like that b4 [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
tresa Posted October 9, 2006 Share Posted October 9, 2006 how dare you question my stupidity =Dj/k thanks..ive never seen anything like that b4I think it's unnecessary to make a loop as the WinWaitClose ("Welcome to Demonica! you are on day") will find the window, for any day numberfor example the window with the titleWelcome to Demonica! You are on day: 23 of your questwill be matched Link to comment Share on other sites More sharing options...
Helge Posted October 9, 2006 Share Posted October 9, 2006 It's also possible to use regexp, if setting WinTitleMatchMode (Opt) to 4. 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