Jump to content

MsgBox with no flag


junah
 Share

Recommended Posts

You could always use SplashTextOn


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

Link to comment
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
Link to comment
Share on other sites

  • Moderators

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

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

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... :)
Link to comment
Share on other sites

  • Moderators

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

In a happier forum :) ?

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

  • Moderators

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

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

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

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