ant2ne Posted February 4, 2009 Share Posted February 4, 2009 I would like a msgbox to pop up that is on top of all other windows. I can find info on ONTOP for other windows, but not for msgbox, or even if it is possible. $return_Value = MsgBox(4,"Title ON TOP", "This message is on top of all other windows",10) Thanks, Link to comment Share on other sites More sharing options...
ProgAndy Posted February 4, 2009 Share Posted February 4, 2009 (edited) Helpfile: MsgBoxdecimal flag Miscellaneous-related Result hexadecimal flag 0 (nothing else special) 0x0 262144 MsgBox has top-most attribute set 0x40000 524288 title and text are right-justified 0x80000 Edited February 4, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
ant2ne Posted February 4, 2009 Author Share Posted February 4, 2009 how do I use that flag, with the 4 flag? $return_Value = MsgBox(4,"Title ON TOP", "This message is on top of all other windows",10) Link to comment Share on other sites More sharing options...
SpookMeister Posted February 4, 2009 Share Posted February 4, 2009 (edited) So if you wanted an OK and Cancel button (flag of '1') you would add 1 to 262144 to get: $return_Value = MsgBox(262145, "Title ON TOP", "This message is on top of all other windows", 10) Select Case $return_Value = 1 ConsoleWrite("You pressed OK" & @CRLF) Case $return_Value = 2 ConsoleWrite("You pressed CANCEL" & @CRLF) Case $return_Value = -1 ConsoleWrite("The msgbox timed out" & @CRLF) Case Else ConsoleWrite("something else happened" & @CRLF) EndSelect Edited February 4, 2009 by SpookMeister [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
ant2ne Posted February 4, 2009 Author Share Posted February 4, 2009 So if you wanted an OK and Cancel button (flag of '1') you would add 1 to 262144 to get: $return_Value = MsgBox(262145, "Title ON TOP", "This message is on top of all other windows", 10) Select Case $return_Value = 1 ConsoleWrite("You pressed OK" & @CRLF) Case $return_Value = 2 ConsoleWrite("You pressed CANCEL" & @CRLF) Case $return_Value = -1 ConsoleWrite("The msgbox timed out" & @CRLF) Case Else ConsoleWrite("something else happened" & @CRLF) EndSelectGREAT THANKS !!! 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