Sign in to follow this  
Followers 0
redfive19

MsgBox w/o the OK button

4 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

dude thank you!!! that's very nice and pretty much exactly what I needed!

Share this post


Link to post
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
Sign in to follow this  
Followers 0