Jump to content

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]

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
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]

Link to comment
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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...