Sign in to follow this  
Followers 0
Vindicator209

All numbers 1- 50?

5 posts in this topic

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 this post


Link to post
Share on other sites



#2 ·  Posted (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 by SmOke_N

[center]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.[/center]

Share this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0