Fullmoon Posted August 13, 2009 Share Posted August 13, 2009 How can I make this message box: At begin: Message:This window will change it message after 10 seconds without closing the message box. After 10 sec.: Message:Completed! Current projects:Unicode virtual pet Link to comment Share on other sites More sharing options...
Nutster Posted August 13, 2009 Share Posted August 13, 2009 (edited) The time-out feature on the message box closes the message box; there is no built-in mechanism to change the text in a message box. I recommend one of the following:Use the search feature to look for a script somebody has already posted in the Examples area that does this.Use the GUI features of AutoIt to create your own version of a message box, Ok and Cancel buttons, etc. where you change the message on after a given time.Use the time-out feature in the message-box. Show the message box, then check @Error to see if it closed with the time out. If so, quickly launch another message-box with the second message. See if that can actually do what you want.Create the message box in one AutoIt script and call another script to change things. In one script, launch a second AutoIt script that will look for the message box the first one will show and change the text after the message box has been shown for ten seconds. Use the sleep function in the called script to get the 10-second delay. When you come back from the sleep, make sure the message box is still there.See if any of these help. I am not even sure any of these will work as I have not tested them. Edited August 13, 2009 by Nutster David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd... Link to comment Share on other sites More sharing options...
colafrysen Posted August 13, 2009 Share Posted August 13, 2009 How can I make this message box:At begin:Message:This window will change it message after 10 seconds without closing the message box.After 10 sec.:Message:Completed!You won't, unless you create an custom MessageBox with GUICreate(), GUICtrlCreateButton(),GUICtrlCreateLabel() and GUICtrlCreateIcon()You could also put a timeout on the message box, so it closes, but immediately opens a new one. [font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size] Link to comment Share on other sites More sharing options...
Fullmoon Posted August 13, 2009 Author Share Posted August 13, 2009 But I want the code of the method. Current projects:Unicode virtual pet Link to comment Share on other sites More sharing options...
colafrysen Posted August 13, 2009 Share Posted August 13, 2009 But I want the code of the method.As a unwritten rule: People on this forum do not write code for you. But if you post something to show that you have at least tried, we will gladly help. If you do not even wanna try then go torentacoderBut for the solutions i posted, Look up "Gui Concepts" in the helpfile. For the one where you immediately open a new one, look up MsgBox. [font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size] Link to comment Share on other sites More sharing options...
martin Posted August 13, 2009 Share Posted August 13, 2009 As a unwritten rule: People on this forum do not write code for you. But if you post something to show that you have at least tried, we will gladly help. If you do not even wanna try then go torentacoder But for the solutions i posted, Look up "Gui Concepts" in the helpfile. For the one where you immediately open a new one, look up MsgBox. Difficult how the OP could have posted some code since he has describedquite clearly what he wants but doesn't know how to code it or if it iseven possible. You have also effectively stated that it can't be done so how then could he post some code? It can be done and Nutster's post has some good tips. Here's another way [ code ] #include <timers.au3> #include <sendmessage.au3> Const $WM_SETTEXT = 0x000C $gui = GUICreate("dummy") $t = _Timer_SetTimer($gui,2000,"changetitle") msgbox(262144,"this is my start title which must be long enough","don't click ok too soon!",15) GUIDelete($gui) Func changetitle($a,$b,$c,$d) if winexists("this is my start title") Then $sd = dllstructCreate("Char[30]") DllStructSetData($sd,1,"New Text") _sendmessage(controlgethandle("this is my start title which must be long enough","","Static1"),$WM_SETTEXT,0,dllstructgetptr($sd)) WinSetTitle("this is my start title","","Title is now something else") EndIf _Timer_KillAllTimers($gui) EndFunc Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Fullmoon Posted August 13, 2009 Author Share Posted August 13, 2009 (edited) Thanks for the code!I expand the functionality of the program with icons,score variables,and much more! Edited August 13, 2009 by Fullmoon Current projects:Unicode virtual pet Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now