crz Posted May 20, 2008 Share Posted May 20, 2008 Hello autoitscripters! I've searched and searched, without finding what I'm looking for. I want my GUI to display a simple MsgBox - Just like notepad does it, when you wanna close it, without saving your changes. I don't want my MsgBox to be displayed in the taskbar along with my GUI. - Like it does by diffault. Is there a solution? Thanks in advance. - crz Steffen "crz" Jorgensenwww.crz.dkcrz@crz.dk Link to comment Share on other sites More sharing options...
faire Posted May 20, 2008 Share Posted May 20, 2008 (edited) I did a quick search for you. You could try using this code:$window = WinGetHandle("MsgBox title") $newParent = WinGetHandle("Program Manager") DllCall("user32.dll", "hwnd", "SetParent", "hwnd", $window, "hwnd", $newParent)Substitute "MsgBox title" for the title of your message box.Though I'm sure there's an easier way.Edit: doesn't seem to work on MsgBox... Edited May 20, 2008 by faire Link to comment Share on other sites More sharing options...
crz Posted May 20, 2008 Author Share Posted May 20, 2008 @faire Can't quite get it to work with the MsgBox either. Works on the GUI though, lol. Thanks anyways, m8! Steffen "crz" Jorgensenwww.crz.dkcrz@crz.dk Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 20, 2008 Share Posted May 20, 2008 (edited) I did a quick search for you. You could try using this code: $window = WinGetHandle("MsgBox title") $newParent = WinGetHandle("Program Manager") DllCall("user32.dll", "hwnd", "SetParent", "hwnd", $window, "hwnd", $newParent) Substitute "MsgBox title" for the title of your message box. Though I'm sure there's an easier way. Edit: doesn't seem to work on MsgBox... While the MsgBox() is up, your script is blocked, so the script can't modify it's own MsgBox(). There are ways around this, where you launch a separate process for the MsgBox(), but they are kind of ugly. Better to just create a custom MsgBox GUI of your own. P.S. As Siao pointed out, you can make the MsgBox() a child of your main GUI by providing the $hWND option, and it doesn't show on the taskbar. It still blocks the script while it's up, though. Edited May 20, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
rudi Posted May 20, 2008 Share Posted May 20, 2008 Hi.Use a GUI instead. To see how to hide away from taskbar see this posting.Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
Siao Posted May 20, 2008 Share Posted May 20, 2008 (edited) Damn, how I hate topics like these. In latest version of AutoIt, parent window parameter was added to MsgBox(), FileSelectFolder(), FileOpenDialog(), FileSaveDialog(). It's documented both in changelog and corresponding helpfile articles. Case closed. Edited May 20, 2008 by Siao "be smart, drink your wine" Link to comment Share on other sites More sharing options...
crz Posted May 20, 2008 Author Share Posted May 20, 2008 @Siao Wauw, I didn't actually miss that. I saw it many trys, searches, topics and replys ago. But it didn't change a thing adding the GUI handle to the MsgBox's parent parameter. Now I get it. I didn't add the "timeout" parameter, that lies just before it. So it probably ignored me adding the GUIs handle. Sick!! Thanks. Steffen "crz" Jorgensenwww.crz.dkcrz@crz.dk 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