Jump to content

MsgBox w/o the OK button


Recommended Posts

First of all, thank you all for your help in my previous two posts. I apologize for spamming the forums.

I am trying to rewrite something that one of my colleagues wrote in WinBatch (and entire deployment script, about 600 lines of CODE!) and I am 99.9% done (and might I add that AutoIt is MUCH more efficient than WinBatch at basically everything)

There is one function in WinBatch that I really like though. It's called Display. It basically looks like a MsgBox without an OK button. To me, it's a better way to echo things than SplashTextOn because it auto resizes to your text like MsgBox does. Is there a way to replicate this in AutoIt?

thanks again everyone for all of your help,

redfive

Link to comment
Share on other sites

First of all, thank you all for your help in my previous two posts. I apologize for spamming the forums.

I am trying to rewrite something that one of my colleagues wrote in WinBatch (and entire deployment script, about 600 lines of CODE!) and I am 99.9% done (and might I add that AutoIt is MUCH more efficient than WinBatch at basically everything)

There is one function in WinBatch that I really like though. It's called Display. It basically looks like a MsgBox without an OK button. To me, it's a better way to echo things than SplashTextOn because it auto resizes to your text like MsgBox does. Is there a way to replicate this in AutoIt?

thanks again everyone for all of your help,

redfive

Look at SplashTextOn()

If it will not fit your needs then you may make your own GUI for dialog with GUICreate() and GUICtrlCreateLabel(). Look at great Koda - Autoit GUI form designer.

Edited by Zedna
Link to comment
Share on other sites

Somewhat crude but does the trick

_MsgboxNoOK("Test","I am a message box with no OK button, Its a little bit crude but it works" & @crlf & "And you can still do multiple lines etc")



Func _MsgboxNoOK($title = "", $text="")
    Opt("WinWaitDelay",1)
    Run('"' & @AutoItExe & '" /AutoIt3ExecuteLine  "MsgBox(0, ''' & $title & ''', '' ' & $text & ''')"')
    WinWait($title,$text)
    ControlHide($title,$text,"Button1")
    ControlMove($title,$text,"Static1",15,25)
    Opt("WinWaitDelay",250)
EndFunc

Edit: Moved the label down a bit and made it faster too

Edited by ChrisL
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...