Jump to content

_ExtMsgBoxSet help


Go to solution Solved by copyleft,

Recommended Posts

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 by copyleft
Link to comment
Share on other sites

  • Developers
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 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.
  :)

Link to comment
Share on other sites

  • Jos changed the title to _ExtMsgBoxSet help

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.

Link to comment
Share on other sites

  • Moderators

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.

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...