Jump to content

Msgbox Types


Recommended Posts

I'm trying to make a script that goes through all the MsgBox types 1 by one until 70.

So instead of doing:

MsgBox(1, msgbox1, msgbox1)
MsgBox(2, msgbox2, msgbox2)
MsgBox(3, msgbox3, msgbox3)
MsgBox(4, msgbox4, msgbox4)
MsgBox(5, msgbox5, msgbox5)
...
MsgBox(70, msgbox70, msgbox70)

I tried doing:

Global $count1 = 1
Global $title = 1

MsgBox($count1, $title, $count1)

While 1
    If $count1 < 70 Then
        $count1 = $count1 + 1
    Else
        Exit
    EndIf
WEnd

This dosn't go past the first message box and I can't figure out what I am doing wrong.

Thanks for your time.

Link to comment
Share on other sites

Place the message box in the loop so it posts the message box more then once.

You might also want to look at For loops, which are ideal for these jobs.

Global $count1 = 1
Global $title = 1

While 1
    If $count1 < 70 Then
        $count1 = $count1 + 1
    Else
        Exit
    EndIf
    MsgBox($count1, $title, $count1)
WEnd
Link to comment
Share on other sites

You might want to make the msgox go at the top of the loop, and so you son't have to click it, do a script like this.

Global $count1 = 1
Global $title = 1


While 1
MsgBox($count1, $title, $count1,3)
    If $count1 < 70 Then
        $title = $title + 1
        $count1 = $count1 + 1
    Else
        Exit
    EndIf
WEnd

This displays each MSGbox for 3 secs the continues so you dont have to click 70 times

Edited by Paulie
Link to comment
Share on other sites

For $i = 1 To $i + 1
    MsgBox($i, $i, $i, 1)
Next

Don't Run this without a hotkey exit! (or exit with the bottem icon)

This would piss me off....

Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

For $i = 1 To $i + 1
    MsgBox($i, $i, $i, 1)
Next

Don't Run this without a hotkey exit! (or exit with the bottem icon)

This would piss me off....

I see what you were trying to do there, but in case you didn't notice, the upper bound of a For loop doesn't change while the loop is in progress. In other words, this will only show 2 msgboxes and then exit.
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...