MKANET Posted June 9, 2012 Share Posted June 9, 2012 I've been searching and search to find the most appropriate UDFs for what I'm trying to do; but, unfortunately, I just haven't been on the forum long enough to know what's best for me.The best way to describe what I want is to get as close as I can get to it as possible on my own below.The problem is the message box depends on default WIndows fonts and respective sizes. So, if someone has custom fonts for their system message boxes, it could really screw up the way this message box looks. I am hoping someone can help me choose a UDF that allows there to be a countdown timer similar to the one below, yet, the fonts; and, possibly background are easily modifiable by me (background is secondary).#include <_MsgBox.au3> _MsgBox(4096, "MultiServer Mode", "" & @CRLF & _ " Starting UltraBlogger in MultiServer Mode..." & @CRLF & _ " Click Bypass button to start in Single Server mode" , 5, 0, "Bypass")I am hoping some friendly forum members might be able to help me reach my goal more easily. Link to comment Share on other sites More sharing options...
BrewManNH Posted June 9, 2012 Share Posted June 9, 2012 You could try Melba23's Extended Message Box, it allows you to create a custom sized message box and you can set the font/font size/color/background color of the message box. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
MKANET Posted June 9, 2012 Author Share Posted June 9, 2012 Thank you. I'm a bit embarrassed to ask this; but, I honestly get any further that what I have below....Could someone please tell me how to increase the width of the button so I can fit more characters? I was hoping it would automatically grow based on text length.Lastly, Once, the button is clicked, I would like for the script to create a blank file located here: $localappdata & "switched.txt"If the button isn't clicked, to try to delete that blank file if it exists.Thanks so much in advance#include "ExtMsgBox.au3" _ExtMsgBoxSet(3, 0, 0x000073, 0xFF9C18, 10, "Arial Black") $sMsg = "UltraBlogger starting in MultiServer Mode... " & @CRLF $sMsg &= "Click button to switch to Single Server mode " $iRetValue = _ExtMsgBox (128, "Switch...", "MultiServer Mode", $sMsg, 7) ConsoleWrite("Test 6 returned: " & $iRetValue & @CRLF) _ExtMsgBoxSet(Default) Link to comment Share on other sites More sharing options...
MKANET Posted June 9, 2012 Author Share Posted June 9, 2012 (edited) Edit: I thought I was able to figure this out on my own, but I'm going to need some help. Im trying to make the button bigger in my code; and, if the button is selected to create a blank text file. I was able to find another piece of code that I thought might help me; but, unfortunately the code was a bit too different for me to integrate into mine. My code: $sMsg = "UltraBlogger starting in MultiServer Mode... " & @CRLF $sMsg &= "Click button to switch to Single Server mode " $iRetValue = _ExtMsgBox (128, "Switch...", "MultiServer Mode", $sMsg, 7) ConsoleWrite("Mode switcher returned: " & $iRetValue & @CRLF) _ExtMsgBoxSet(Default) EDIT: My apologies, is it possible I asked this question in the wrong forum or thread? I was wondering if perhaps I should have asked for help in the extended message box thread. Another piece of code I found. I wish this example included extended message box code. #include <GUIConstantsEx.au3> #include "ExtMsgBox.au3" ModeSwitcher() Func ModeSwitcher() Local $Button_1, $msg GUICreate("Mode Switch") Opt("GUICoordMode", 1) $Button_1 = GUICtrlCreateButton("Run Notepad", 10, 30, 200) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 Run('notepad.exe') EndSelect WEnd EndFunc Edited June 9, 2012 by MKANET Link to comment Share on other sites More sharing options...
MKANET Posted June 10, 2012 Author Share Posted June 10, 2012 (edited) I was able to take apart the example code provided with Extended Message Box. Unfortunately, the code that's used to make the buttons bigger are meant for the buttons created by Extended Message Box. I can't find code anywhere showing larger buttons for message boxes created within Extended Message Box. Is this something that only a standard GUI message windows can do? If so, maybe I need to create color GUI windows and custom fonts? Hopefully someone might be able to help me out. Thanks in advance! Edited June 10, 2012 by MKANET Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 10, 2012 Moderators Share Posted June 10, 2012 MKANET,ExtMsgBox just creates a GUI using the parameters in the function call - button width is set automatically to fit within the GUI so it cannot deal with very long button text. But all you have to do is add the text you have in the button to the main body of the ExtMsgBox and then use a short text on the button as shown in "Test 6" of the example script. If that is not sufficient then I suggest that you use whatever code is useful from the UDF to create your own version. I am more than happy to help develop it, but I am not adapting the UDF to have expanding buttons for reasons I have explained at length in the UDF thread. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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