copyleft Posted May 26, 2022 Posted May 26, 2022 (edited) OK, grad students. Basically, I'm in third grade here. I thought the way to use this UDF was to put "ExtMsgBox.au3" in the AutoIt include folder and then make an "#include" declaration in my AutoIt script to call ExtMsgBox 's functions. But I'm not understanding how to change my message box font, dimensions, dialog icon or time out. I've seen ExtMsgBox called like this: " _ExtMsgBoxSet as well as like this #include= <ExtMsgBox> So can someone post an annotated example of ExtMsgBox with: 1. 16pt Arial font 2. Centered in screen (or shows some X & Y coordinates) 2. with OK/CANCEL buttons 3. uses the "C:\Windows\explorer.exe" icon on the MsgBox 4. that says "Hello World" on the 1st line 5. That says "back at you" on the 2nd line 6. That times out to "OK" button after 5 seconds Basically, I want something that looks like "Test2" example in the "ExtMsgBox_Example_1.au3" scriipt. Thanks in advance. Edited May 26, 2022 by copyleft
Developers Jos Posted May 26, 2022 Developers Posted May 26, 2022 (edited) 12 minutes ago, copyleft said: OK, grad students. Basically, I'm in third grade here. Do they also do counting in your group for numbered lists? Quote So can someone post an annotated example of ExtMsgBox with: Right ..... .you first show us the code you have tried! I the mean time I move this into its own thread as there is no real relation to the topic you used. Jos Edited May 26, 2022 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
copyleft Posted May 26, 2022 Author Posted May 26, 2022 Not trying to be coy. I've tried this: #include <ExtMsgBox.au3> _ExtMsgBoxSet ( 3, 0, 0xF0F4F9, 0xFF0000, 16, "Arial" ) $sMsg = "This is a test. Is it OK to proceed?" $iRetValue = _ExtMsgBox ( 128, "OK|Cancel", "Match !", $sMsg, 5 ) Still confused on how to change window icon and font and size of window title.
Moderators Melba23 Posted May 26, 2022 Moderators Posted May 26, 2022 copyleft, And what does not work when you run that script? M23 P.S. Quote I thought the way to use this UDF was to put "ExtMsgBox.au3" in the AutoIt include folder Not quite correct. I recommend reading this Wiki page. 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
copyleft Posted May 27, 2022 Author Posted May 27, 2022 From my understanding, it's not wrong to put UDFs in the include folder and shouldn't make any difference when executing a script. it's just not recommended because that folder could be overwritten during upgrades. Since I backup that folder, I'm not concerned about that possibility. Script works fine, Still not understanding where to put an icon path or how to size it and titlebar text.
Moderators Melba23 Posted May 27, 2022 Moderators Posted May 27, 2022 copyleft, Quote I'm not concerned about that possibility As you wish - your system. Quote Still not understanding where to put an icon path Have you looked at the function headers within the UDF? From _ExtMsgBoxSet: ; $sTitlebar_Icon -> Icon to use on ExtMsgBox titlebar - default is standard AutoIt icon ; When set to name of an ico or exe file, the main icon within will be displayed ; If another icon from the file is required, add a trailing "|" followed by the icon index And _ExtMsgBox: ; Parameters ....: $vIcon -> Sets the required icon in the GUI display and optionally in the titlebar of the ExtMsgBox [...] ; Titlebar icon: ; Use a semicolon delimiter followed by the name/index of the required exe/ico file ; Default (no delimiter or name) = use global icon setting from _ExtMsgBoxSet This works fine for me: #include <ExtMsgBox.au3> ; As you have the UDF in the standard include folder you should use <> to search there first _ExtMsgBoxSet(3, 0, 0xF0F4F9, 0xFF0000, 16, "Arial", Default, Default, Default, "C:\Windows\explorer.exe") $sMsg = "This is a test. Is it OK to proceed?" $iRetValue = _ExtMsgBox(128, "OK|Cancel", "Match !", $sMsg, 5) Quote how to size it and titlebar text You cannot - the titlebar of the ExtMsgBox is produced by Windows and uses system values for sizing. The UDF sizing code deals only with client area controls. M23 Parsix 1 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
copyleft Posted June 1, 2022 Author Posted June 1, 2022 One other question: When choosing the countdown timer instead of the GUI display icon, is the timer digit(s) always the same size as the message box text or can it be made more or less prominent and can its location in the message box be changed?
Moderators Melba23 Posted June 1, 2022 Moderators Posted June 1, 2022 copyleft, The countdown digits are shown in a label which is the same size (32x32) and in the same place as an icon to ease the calculations of ExtMsgBox size for the various options. And the font is set to the default font for the OS at 18pt. You can see the code for this at lines #675-678 in the library file. 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
copyleft Posted June 1, 2022 Author Posted June 1, 2022 Thanks for the quick response. Great app, now that I understand it a little better.
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