Sign in to follow this  
Followers 0
junah

MsgBox with no flag

12 posts in this topic

Hi, is there someone who know how can i make a Message Box without the "OK" button ?

I tryed to do that using :

MsgBox(0,"Message","The installation is complete", 5)

But the "Ok" button is still here.

Help me please, thanks !

Share this post


Link to post
Share on other sites



You could always use SplashTextOn



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Hi, is there someone who know how can i make a Message Box without the "OK" button ?

I tryed to do that using :

MsgBox(0,"Message","The installation is complete", 5)

But the "Ok" button is still here.

Help me please, thanks !

Or, make one out of GUI, thats a bit of work to make it look just like a message box, but it can be made to wor, and you can do more with it then you can with splashtexton

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Global $iPID
_MsgBoxNoButton(0, 'Not Visible', 'A Message Box')
Sleep(3000)
ProcessClose($iPID)

Func _MsgBoxNoButton($iFlag, $sTitle, $sText, $iTime = 0)
    Local $_MsgBox_ = '"' & "ConsoleWrite(MsgBox(" & $iFlag & ', ""' & $sTitle & '"", ""' & $sText & '"", ' & $iTime & '"))'
    $iPID = Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & $_MsgBox_, '', @SW_SHOW, 6)
    Do
        Sleep(10)
    Until WinExists($sTitle)
    Sleep(20)
    For $iCC = 1 To 3
        If ControlGetHandle($sTitle, '', 'Button' & $iCC) <> '' Then
            ControlHide($sTitle, '', 'Button' & $iCC)
            Do
                Sleep(10)
            Until Not ControlCommand($sTitle, '', 'Button' & $iCC, 'IsVisible', '') 
        EndIf
    Next
    Return 1
EndFunc

Edited by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

Global $iPID
_MsgBoxNoButton(0, 'Not Visible', 'A Message Box')
Sleep(3000)
ProcessClose($iPID)

Func _MsgBoxNoButton($iFlag, $sTitle, $sText, $iTime = 0)
    Local $_MsgBox_ = '"' & "ConsoleWrite(MsgBox(" & $iFlag & ', ""' & $sTitle & '"", ""' & $sText & '"", ' & $iTime & '"))'
    $iPID = Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & $_MsgBox_, '', @SW_SHOW, 6)
    Do
        Sleep(10)
    Until WinExists($sTitle)
    Sleep(20)
    For $iCC = 1 To 3
        If ControlGetHandle($sTitle, '', 'Button' & $iCC) <> '' Then
            ControlHide($sTitle, '', 'Button' & $iCC)
            Do
                Sleep(10)
            Until Not ControlCommand($sTitle, '', 'Button' & $iCC, 'IsVisible', '') 
        EndIf
    Next
    Return 1
EndFunc
Ahh Smoke, where would we be without you... :)

Share this post


Link to post
Share on other sites

Ahh Smoke, where would we be without you... :P

In a happier forum :) ?

[center]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.[/center]

Share this post


Link to post
Share on other sites

In a happier forum :) ?

Modesty... :P

Share this post


Link to post
Share on other sites

Hey ! thanks for your answers.

I've tested the SplasTextOn command and it works very well Thanks Bigdog and the others.

Using Guy is little difficult for me for the moment, i don't know how exactly it works. I thank you.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Thank you Smoke N, i 've tested your code and it works fine.

How can i enlarge the box please ? and is there a way to add some color on it ?

Thanks.

Edited by junah

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Thank you Smoke N, i 've tested your code and it works fine.

How can i enlarge the box please ? and is there a way to add some color on it ?

Thanks.

I would agree with others junah, that splashtexton or splashimageon is the way you are actually wanting to go. My example was a proof of concept only for those that said you couldn't (or hinted you couldn't). It's an actual message box so the answer to your question is "No until someone shows me a proof of concept with an actual message box and not a skin :) (to all of you that were thinking that)." Just stick with one of the 2, SplashTextOn or SplashImageOn and you will be fine. (Unfortunately, neither individually allow "both" types of options) Edited by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

I would agree with others junah, that splashtexton or splashimageon is the way you are actually wanting to go. My example was a proof of concept only for those that said you couldn't (or hinted you couldn't). It's an actual message box so the answer to your question is "No until someone shows me a proof of concept with an actual message box and not a skin :) (to all of you that were thinking that)." Just stick with one of the 2, SplashTextOn or SplashImageOn and you will be fine. (Unfortunately, neither individually allow "both" types of options)

ok i understand, i've tryed all the way to do this and i think i'll use the SplashImageOn command (it's more pretty).

I've stored the others way for the futur, i think i'll need them : THANK YOU ALL

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