# All numbers 1- 50?

## Recommended Posts

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]

##### Share on other sites

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 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.

##### Share on other sites

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]

##### Share on other sites

how dare you question my stupidity =D

j/k thanks..ive never seen anything like that b4

I 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 number

for example the window with the title

Welcome to Demonica! You are on day: 23 of your quest

will be matched

##### Share on other sites

It's also possible to use regexp, if setting WinTitleMatchMode (Opt) to 4.

## Create an account

Register a new account

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...