James Posted November 30, 2006 Share Posted November 30, 2006 How can I make MsgBox loop? I'm making a game, but if you mess up, you get 5msg boxes. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
xcal Posted November 30, 2006 Share Posted November 30, 2006 Just use a For...Next loop with your msgbox in it? How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
James Posted November 30, 2006 Author Share Posted November 30, 2006 ? Can you explain? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
NELyon Posted November 30, 2006 Share Posted November 30, 2006 Can you show some code? Link to comment Share on other sites More sharing options...
James Posted November 30, 2006 Author Share Posted November 30, 2006 I just need this MSgBox to be repeated. $msg = MsgBox(64, "Wrong", "That door was trapped! So are you!") Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
xcal Posted November 30, 2006 Share Posted November 30, 2006 That's just your message box. What D-Gen was asking for, was an example of an attempt at a solution. But, like I said, just use a For...Next loop, and stick your msgbox in it. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
mikehunt114 Posted November 30, 2006 Share Posted November 30, 2006 (edited) For $i = 1 to 5 $msg = MsgBox(64, "Wrong", "That door was trapped! So are you!") Next ; Or $i = 0 While $i < 5 $msg = MsgBox(64, "Wrong", "That door was trapped! So are you!") $i += 1 WEnd ; Or $i = 0 Do $msg = MsgBox(64, "Wrong", "That door was trapped! So are you!") $i += 1 Until $i >= 5 As pointed out, if you provide more information you will get a better answer. Edited November 30, 2006 by mikehunt114 IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
James Posted November 30, 2006 Author Share Posted November 30, 2006 I dont know how to, Im still a n00b. Would $msg = loop(5) work? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
xcal Posted November 30, 2006 Share Posted November 30, 2006 Just to expand a little on mike's examples... For $i = 1 To 5 MsgBox(48, '!!!', 'I should read the help file!', 1) Next How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
James Posted November 30, 2006 Author Share Posted November 30, 2006 Oh hahaha. I looked, but its not as useful as people think! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
mikehunt114 Posted November 30, 2006 Share Posted November 30, 2006 @ xcal: lol @ Secure: The helpfile is extremely useful. You could even go so far as to say it is a big HELP. It may even be the best HELP tool for AutoIt. These forums are great, but I learned mass amounts from the helpfile and it's examples before I started asking questions here. Not to discourage you from asking us here, there are usually lots of people willing to help, we just like to see that you made the effort to try and teach yourself with the helpfile first. IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
Helge Posted November 30, 2006 Share Posted November 30, 2006 Another great statement from Secure_ICT... Is it possible for someone to think that the helpfile is useful while it's actually not ? If they think it's useful then that must mean that it's answered or solved something for them, so I don't really follow your logic there, Secure. Also, apart from that your wording doesn't make any sense in my head, it's also entirely wrong looking at what's said. The helpfile is indeed very useful and I use it all the time. I've got 4 shortcuts in my quicklaunch and the AutoIt helpfile is one of them. If you don't find it useful then you don't know how to use it, and should get some kind of helpfile-helpfile. Link to comment Share on other sites More sharing options...
mikehunt114 Posted November 30, 2006 Share Posted November 30, 2006 (edited) Func HelpfileHelpfile() For $i = 0 to $infinity Slap() Next RedundantSlapButIAddedItBecauseIFeltLikeIt() EndFunc Edited November 30, 2006 by mikehunt114 IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
James Posted December 1, 2006 Author Share Posted December 1, 2006 Well, I'll admit, it is useful. But complicated to find the right things. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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