Jump to content

MsgBox() help


Recommended Posts

MsgBox ( flag, "title", "text" [, timeout] )
MsgBox ( flag, "title", "text" [, timeout] )

You cannot make a msgbox inside of a msgbox such as

MsgBox(0, "Testing", MsgBox(0, "Testing in a MsgBox", "See doesn't work"))

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

  • Moderators

MsgBox ( flag, "title", "text" [, timeout] )
MsgBox ( flag, "title", "text" [, timeout] )

You cannot make a msgbox inside of a msgbox such as

MsgBox(0, "Testing", MsgBox(0, "Testing in a MsgBox", "See doesn't work"))
Why can't you? I do it often.

@OP ... look for SetTimer in the help file, and create a function that creates the message box from the timer function.

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

Ahhh creating two msgbox hmmm quite a concept, you'll need multitasking though and that is far more complicated as it has a system that deals out things regardless to what is happen (quite the concept for a single layer codebased - autoit to accomplish without some tickering from DLLs) You could create a msgbox and regardless call another msgbox if you have multi-threading on. But remember you cannot create a msgbox inside a msgbox you need to create a gui windows to do that

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

  • Moderators

MsgBox ( flag, "title", "text" [, timeout] )
MsgBox ( flag, "title", "text" [, timeout] )

You cannot make a msgbox inside of a msgbox such as

MsgBox(0, "Testing", MsgBox(0, "Testing in a MsgBox", "See doesn't work"))

Ahhh creating two msgbox hmmm quite a concept, you'll need multitasking though and that is far more complicated as it has a system that deals out things regardless to what is happen (quite the concept for a single layer codebased - autoit to accomplish without some tickering from DLLs) You could create a msgbox and regardless call another msgbox if you have multi-threading on. But remember you cannot create a msgbox inside a msgbox you need to create a gui windows to do that

Maybe it just takes a little creativity.

MsgBox(0, "Testing", "This is an Example, you just called a message box before me." & Chr(MsgBox(0, "Testing in a MsgBox", "See doesn't work")-1))

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

Why can't you? I do it often.

@OP ... look for SetTimer in the help file, and create a function that creates the message box from the timer function.

You cannot create two windows to showing up at the same exact time regardless to however you put in because this autoit isn't multithreaded. Yes, it does work but not at the same time, First one showing is the msgbox inside the function and then a message in the orginal msgbox after it has been closed

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

Maybe it just takes a little creativity.

MsgBox(0, "Testing", "This is an Example, you just called a message box before me." & Chr(MsgBox(0, "Testing in a MsgBox", "See doesn't work")-1))

Yes finally you agree with me it isn't showing two MsgBox at once but the inside to outside, error found then

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

  • Moderators

Yes finally you agree with me it isn't showing two MsgBox at once but the inside to outside, error found then

Ahh, I understand what you are saying now. However, you're wrong... I've given the answer on how to do it in my first post.

Edit:

And here's even a generic way to do it:

_myMessageBox(64, "MsgBox", "I am a messagbox")
_myMessageBox(16, "Oops", "There are two of us")

Func _myMessageBox($i_flag, $s_title, $s_text, $n_timeout = 0)
    Local $s_msgbox = "MsgBox(" & $i_flag & ",'" & _
            $s_title & "','" & _
            $s_text & "'," & _
            $n_timeout & ")"
    Return Run('"' & @AutoItExe & '" /AutoIt3ExecuteLine "' & $s_msgbox & '"')
EndFunc
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

Perhaps I must have missed it because it does the same thing I replied with inside to outside (by this I mean from the inside functions it completes and when that is complete it shows the functions itself called) BUT doesn't produce two at once. So no two come up on the screen at any one time using Autoit without a multithread

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

  • Moderators

Perhaps I must have missed it because it does the same thing I replied with inside to outside (by this I mean from the inside functions it completes and when that is complete it shows the functions itself called) BUT doesn't produce two at once. So no two come up on the screen at any one time using Autoit without a multithread

Read my edit.

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

ahhh I see how you are doing it then, but you executed two programs and ended it leaving up the windows and script online. Pretty good, then you'll need to stop the script each time you do that though else you'll run right by what you put up those two subprograms for

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

I believe it is possible to run two in the same time if you used DllCall() to run them. I don't know the code for it but I believe I have seen it somewhere. (please correct me if I am wrong)

Link to comment
Share on other sites

Yes you are correct they are found by a multithreaded program to run two in a program and still maintain the program , not just executing a program to two messageboxs the writing up a winactive on both those to see if it gets rid of those windows to continue

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

  • Moderators

Yes you are correct they are found by a multithreaded program to run two in a program and still maintain the program , not just executing a program to two messageboxs the writing up a winactive on both those to see if it gets rid of those windows to continue

You're hard headed. I gave you the answer to how to do it in my first post... I just posted another "quickly done" example of how you were wrong in another way.

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

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