Jump to content

Do something while n msgbox is displayed


 Share

Recommended Posts

Hi all,

How can I let the script do something while an msgbox is displayed?

I tried this:

while MsgBox(64, "test", "test")

Run("notepad.exe")

WinWaitActive("Naamloos - Kladblok")

Send("yreeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeefddddddddddddddddddfdgwrgwgwrgwrgwrgwrg")

WEnd

But that didnt work. Any Ideas? Thanks!

Link to comment
Share on other sites

Hi all,

How can I let the script do something while an msgbox is displayed?

I tried this:

But that didnt work. Any Ideas? Thanks!

Put it in a func ;example

instead of a action being done and sending

CODE

Msgbox(64,'test','test')

;

;Just send

;

Mes()

and add func

CODE

func Mes()

MsgBox(64, "test", "test")

Run("notepad.exe")

WinWaitActive("Naamloos - Kladblok")

Send("yreeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeefddddddddddddddddddfdgwrgwgwrgwrgwrgwrg")

endfunc

PS i suck at codeboxes

Edited by lordicast
[Cheeky]Comment[/Cheeky]
Link to comment
Share on other sites

@lordicast, sorry but that does not help the problem, now the msgbox just hangs in the function...

Works just fine for me.

Func Mes()
MsgBox(64,'test','test')
run('notepad.exe')
WinWaitActive('Untitled - Notepad')
Send("yreeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeefddddddddddddddddddfdgwrgwgwrgwrgwrgwrg")
EndFunc

But I think if a Msgbox is up you cant get to anything else on the gui till you closed it right, so its gonna close at one point then why not send somthing after the box is closed. makes sense

Edited by lordicast
[Cheeky]Comment[/Cheeky]
Link to comment
Share on other sites

How can I let the script do something while an msgbox is displayed?

Your function just does the same thing his script does... it waits until AFTER the msgbox is gone to continue...

No it does not do what he wants.

He wants a message box to be up, and to perform lines of code WHILE the msgbox is up... your code does NOT do that.

Link to comment
Share on other sites

This was the solution from my previous post:

Run(@AutoItExe & ' /AutoIt3ExecuteLine  "If MsgBox(262209,''Ready to Re-Start'',''The Installation is completed and ready to re-start.     '' & @CRLF & @CRLF & ''Press OK to restart now.'' & @CRLF & @CRLF) = 1 Then Shutdown(6)"')
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...