Jump to content

Extended Message Box - New Version: 16 Feb 24


Melba23
 Share

Recommended Posts

Hi,

thanks to Melba23 for this very usefull UDF!

I have only one problem:

If I have a "&" in the string, this is missing in the Extended Message Box.
This is the only special character, that gets removed by _ExtMsgBox:

 

1991515652_2020-08-1315_00_38.png.30f3606badc278cba8c27e5a63d6f7d5.png

 

How can I prevent this removing?

I searched here in this thread and searched in the UDF, but could not find the cause.

The only way to prevent this, is to double the "&":

51412307_2020-08-1315_12_51.png.91245720435d42a10df300e9eed3f21c.png

 

But this makes it very complicated, because I would have to implement a way to add a second "&" in every string which may contain a "&".

Edit:

I solved this by adding this line before "_ExtMsgBox(...)":

$sMsg = StringReplace($sMsg, "&", "&&")

 

Edited by Trash
Link to comment
Share on other sites

  • Moderators

Trash,

Test 3 within the Example_1 script does show how to display an & character:

Case $hButton3

            ; Set the message box right justification, colours (yellow text on blue background) and change font
            _ExtMsgBoxSet(1, 2, 0x004080, 0xFFFF00, 10, "Comic Sans MS")

            $sMsg = "This is centred on 'EMB Test' with an Exclamation icon, 2 buttons, wrapped right justified coloured text, "
            $sMsg &= "coloured background, no Taskbar button and TOPMOST set" & @CRLF & @CRLF
            $sMsg &= "Note you can get && in button text" & @CRLF
            $sMsg &= "and neither button is set as default" & @CRLF & @CRLF
            $sMsg &= "It will not time out"

            ; Use $MB_ constant
            $iRetValue = _ExtMsgBox($EMB_ICONEXCLAM, "One Way|To && Fro", "Test 3", $sMsg, 0, $hTest_GUI)
            ConsoleWrite("Test 3 returned: " & $iRetValue & @CRLF)

            ; Reset to default
            _ExtMsgBoxSet(Default)

Specifically this line:

"Note you can get && in button text"

So I did my best to explain! Glad you got it sorted.

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

  • 3 months later...
  • Moderators

matwachich,

If you create the parent than you already know the font used, so just use _ExtMsgBoxSet to set that font for an ExtMsgBox which is generated.

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

  • 5 months later...

Hi,

i like the Extended Message Box very much and want to replace my recent dalog wth this.

In my recent dialog we have wriiten the flag like this:

$hFlag = BitOR($MB_OKCANCEL, $MB_DEFBUTTON2, $MB_ICONQUESTION)
$hFlag = BitOR($MB_YESNOCANCEL, $MB_DEFBUTTON3, $MB_ICONQUESTION)
$hFlag = BitOR($MB_OK, $MB_DEFBUTTON1, $MB_ICONINFORMATION)
$hFlag = BitOR($MB_OK, $MB_DEFBUTTON1, $MB_ICONWARNING)

How can a retrieve the variables out of $hFlag to use for the extended message box?

which button to use, which default button and which icon.

thanks for giving the formula for this.

cheers mike

Link to comment
Share on other sites

  • Moderators

mike1950r,

You cannot directly convert the flag as ExtMsgBox uses a different syntax to the standard Window MsgBox dialog. But it is not too difficult to mimic the behaviour:

#include "ExtMsgBox.au3"

_ExtMsgBox($EMB_ICONQUERY, "OK|~Cancel", "Test 1", "BitOR($MB_OKCANCEL, $MB_DEFBUTTON2, $MB_ICONQUESTION)")

_ExtMsgBox($EMB_ICONQUERY, "Yes|No|~Cancel", "Test 2", "BitOR($MB_YESNOCANCEL, $MB_DEFBUTTON3, $MB_ICONQUESTION)")

_ExtMsgBox($EMB_ICONINFO, "OK", "Test 3", "BitOR($MB_OK, $MB_DEFBUTTON1, $MB_ICONINFORMATION)")

_ExtMsgBox($EMB_ICONEXCLAM, "OK", "Test 4", "BitOR($MB_OK, $MB_DEFBUTTON1, $MB_ICONWARNING)")

All good?

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

Hi Melba,

thanks for the answer.

I know, that the syntax is different.
What i need is to pull the variables out of BITOR.

I tried:

If BitAND($hFlag, $MB_OK) = $MB_OK Then
    "ok button is used"
EndIf

Or:

If BitAND($hFlag, $MB_ICONQUESTION) = $MB_ICONQUESTION Then
    "Question icon is used"
EndIf

OR:

If BitAND($hFlag, $MB_DEFBUTTON2) = $MB_DEFBUTTON2 Then
    "Def button 2 is used"
EndIf

 

But unfortunately this is all not working.
This is what i need, which formula to use.

 

For example i have used this logic to ask if a windoe is topmost:

If BitAND(_WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE), $WS_EX_TOPMOST) = $WS_EX_TOPMOST Then
    "Window is topmost"
EndIf
 

Or:
Look if a window is readonly:
 

If BitAND(_WinAPI_GetWindowLong($hWnd, $GWL_STYLE), $ES_READONLY) = $ES_READONLY Then
    "Window is readonly"
EndIf

 

You understand what i need?

thanks lot

cheers mike

 

 

Link to comment
Share on other sites

  • Moderators

mike1950r,

As clear as mud!

Why are you trying to determine which values are set in the BitOR? Surely you are creating the dialog so you must know what values you have combined?

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

this is because we have hundreds of dialogs in our scripts where is always this:

$sTitle = "Example title"
$sMessage = "Example message"
$hFlag = BitOR($MB_OKCANCEL, $MB_DEFBUTTON2, $MB_ICONQUESTION)

$iButton = DialogMessageBox($sMessage, $sTitle, $hFlag)

Our "DialogMessageBox" is our own function, which includes also additional code.
We want to modify this to use your extended messagebox instead of the msgbox of autoit.

So we need to retrieve the infos out of the BITOR like i showed in the window examples.

Ofcourse i can do this with:
If $hFlag = BitOR($MB_OKCANCEL, $MB_DEFBUTTON2, $MB_ICONQUESTION) Then
    "get something"
EndIf

But this is not a very satisfying method.

cheers mike

Link to comment
Share on other sites

  • Moderators

mike1950r,

Not very elegant, but this seems to work:

#include <MsgBoxConstants.au3>
#include "ExtMsgBox.au3"

$sTitle = "Example 1 title"
$sMessage = "Example 1 message"
$hFlag = BitOR($MB_OKCANCEL, $MB_DEFBUTTON2, $MB_ICONQUESTION)
_DialogMessageBox($sTitle, $sMessage, $hFlag)

$sTitle = "Example 2 title"
$sMessage = "Example 2 message"
$hFlag = BitOR($MB_YESNOCANCEL, $MB_DEFBUTTON3, $MB_ICONQUESTION)
_DialogMessageBox($sTitle, $sMessage, $hFlag)

$sTitle = "Example 3 title"
$sMessage = "Example 3 message"
$hFlag = BitOR($MB_OK, $MB_DEFBUTTON1, $MB_ICONINFORMATION)
_DialogMessageBox($sTitle, $sMessage, $hFlag)

$sTitle = "Example 4 title"
$sMessage = "Example 4 message"
$hFlag = BitOR($MB_OK, $MB_DEFBUTTON1, $MB_ICONWARNING)
_DialogMessageBox($sTitle, $sMessage, $hFlag)

Func _DialogMessageBox($sTitle, $sMessage, $hFlag)

    ; Determine icon
    If BitAnd($hFlag, $MB_ICONERROR) = $MB_ICONERROR Then
        $iIcon = $MB_ICONERROR
    EndIf
    If BitAnd($hFlag, $MB_ICONQUESTION) = $MB_ICONQUESTION Then
        $iIcon = $MB_ICONQUESTION
    EndIf
    If BitAnd($hFlag, $MB_ICONWARNING) = $MB_ICONWARNING Then
        $iIcon = $MB_ICONWARNING
    EndIf
    If BitAnd($hFlag, $MB_ICONINFORMATION) = $MB_ICONINFORMATION Then
        $iIcon = $MB_ICONINFORMATION
    EndIf

    ; Determine default button if set
    Local $iDefButton = 0
    If BitAnd($hFlag, $MB_DEFBUTTON1) = $MB_DEFBUTTON1 Then
        $iDefButton = 0
    EndIf
    If BitAnd($hFlag, $MB_DEFBUTTON2) = $MB_DEFBUTTON2 Then
        $iDefButton = 1
    EndIf
    If BitAnd($hFlag, $MB_DEFBUTTON3) = $MB_DEFBUTTON3 Then
        $iDefButton = 2
    EndIf

    ; Now get buttons:
    If BitAnd($hFlag, $MB_OK) = $MB_OK Then
        $sButtonText = "OK"
    EndIf
    If BitAnd($hFlag, $MB_OKCANCEL) = $MB_OKCANCEL Then
            $sButtonText = "OK|Cancel"
    EndIf
    If BitAnd($hFlag, $MB_ABORTRETRYIGNORE) = $MB_ABORTRETRYIGNORE Then
            $sButtonText = "Abort|Retry|Cancel"
    EndIf
    If BitAnd($hFlag, $MB_YESNOCANCEL) = $MB_YESNOCANCEL Then
            $sButtonText = "Yes|No|Cancel"
    EndIf
    If BitAnd($hFlag, $MB_YESNO) = $MB_YESNO Then
            $sButtonText = "Yes|No"
    EndIf
    If BitAnd($hFlag, $MB_RETRYCANCEL) = $MB_RETRYCANCEL Then
            $sButtonText = "Retry|Cancel"
    EndIf
    If BitAnd($hFlag, $MB_CANCELTRYCONTINUE) = $MB_CANCELTRYCONTINUE Then
            $sButtonText = "Cancel|Try Again|Cancel"
    EndIf

    ; Add default button flag
    $iIndex = StringInStr($sButtonText, "|", 2, $iDefButton)
    If $iIndex Then
        $sButtonText = StringLeft($sButtonText, $iIndex) & "~" & StringMid($sButtonText, $iIndex + 1)
    EndIf

    $iRet = _ExtMsgBox($iIcon, $sButtonText, $sTitle, $sMessage)

EndFunc

I will see if I can think of a more elegant way to check over lunch.

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

  • Moderators

mike1950r,

This is more elegant, but does rely on "magic numbers":

#include <MsgBoxConstants.au3>
#include "ExtMsgBox.au3"

$sTitle = "Example 1 title"
$sMessage = "Example 1 message"
$hFlag = BitOR($MB_OKCANCEL, $MB_DEFBUTTON2, $MB_ICONQUESTION)
_DialogMessageBox($sTitle, $sMessage, $hFlag)

$sTitle = "Example 2 title"
$sMessage = "Example 2 message"
$hFlag = BitOR($MB_YESNOCANCEL, $MB_DEFBUTTON3, $MB_ICONQUESTION)
_DialogMessageBox($sTitle, $sMessage, $hFlag)

$sTitle = "Example 3 title"
$sMessage = "Example 3 message"
$hFlag = BitOR($MB_OK, $MB_DEFBUTTON1, $MB_ICONINFORMATION)
_DialogMessageBox($sTitle, $sMessage, $hFlag)

$sTitle = "Example 4 title"
$sMessage = "Example 4 message"
$hFlag = BitOR($MB_OK, $MB_DEFBUTTON1, $MB_ICONWARNING)
_DialogMessageBox($sTitle, $sMessage, $hFlag)

Func _DialogMessageBox($sTitle, $sMessage, $hFlag)

    ; Remove all high level flags
    $hFlag = Mod($hFlag, 4096)
    ; Determine default button
    $iDefButton = Floor($hFlag / 256)
    $hFlag -= 256 * $iDefButton
    ; Determine icon
    $iIcon = 16 * Floor($hFlag / 16)
    $hFlag -= $iIcon
    ; Determine button text
    Switch $hFlag
        Case 0
            $sButtonText = "OK"
        Case 1
            $sButtonText = "OK|Cancel"
        Case 2
            $sButtonText = "Abort|Retry|Cancel"
        Case 3
            $sButtonText = "Yes|No|Cancel"
        Case 4
            $sButtonText = "Yes|No"
        Case 5
            $sButtonText = "Retry|Cancel"
        Case 6
            $sButtonText = "Cancel|Try Again|Cancel"
    EndSwitch
    ; Add default button flag
    $iIndex = StringInStr($sButtonText, "|", 2, $iDefButton)
    If $iIndex Then
        $sButtonText = StringLeft($sButtonText, $iIndex) & "~" & StringMid($sButtonText, $iIndex + 1)
    EndIf

    $iRet = _ExtMsgBox($iIcon, $sButtonText, $sTitle, $sMessage)

EndFunc

Up to you which you prefer.

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

9 hours ago, Melba23 said:

This is more elegant...

IMHO, adding $hFlag as an optional arg to _ExtMsgBox() for instant MsgBox compatibility would be met with cheers from the unwashed masses still hesitant to transition to the superior EMB architecture :)

Code hard, but don’t hard code...

Link to comment
Share on other sites

  • Moderators

JockoDundee,

_ExtMsgBox already accepts the standard MsgBox constants for the icon and button parameters. The only thing missing is changing the default button - at the moment it is always the first - and that might be a simple change.

I do not think having a single $hFlag parameter is feasible as the various parameters melded by BitOR used by the OP are split into different parameters across 2 functions (_ExtMsgBox & _ExtMsgBoxSet) and rewriting the UDF to deal with but a single parameter would likely break a lot of existing scripts.

M23

How about this: ExtMsgBox_Flag.au3

And a test script:

#include <MsgBoxConstants.au3>
#include "ExtMsgBox_Flag.au3"

$sTitle = "Example 1 title"
$sMessage = "Example 1 message"
_ExtMsgBox($MB_ICONQUESTION, BitOR($MB_OKCANCEL, $MB_DEFBUTTON2), $sTitle, $sMessage)

$sTitle = "Example 2 title"
$sMessage = "Example 2 message"
_ExtMsgBox($MB_ICONQUESTION, BitOR($MB_YESNOCANCEL, $MB_DEFBUTTON3), $sTitle, $sMessage)

$sTitle = "Example 3 title"
$sMessage = "Example 3 message"
_ExtMsgBox($MB_ICONINFORMATION, BitOR($MB_OK, $MB_DEFBUTTON1), $sTitle, $sMessage)

$sTitle = "Example 4 title"
$sMessage = "Example 4 message"
_ExtMsgBox($MB_ICONWARNING, BitOR($MB_OK, $MB_DEFBUTTON1), $sTitle, $sMessage)

The UDF will ignore icon (and any other) parameters included in the BitOR.

Thoughts?

M23

Edited by Melba23
Slightly amended code

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

  • Moderators

mike1950r & JockoDundee,

Here is a version with the possibility to embed a standard icon within the button parameter: ExtMsgBox_Flag.au3

And an example script:

#include <MsgBoxConstants.au3>
#include "ExtMsgBox_Flag.au3"

$sTitle = "Example 1 title"
$sMessage = "Example 1 message"
; Embedded ? icon overrides the standalone INFO icon
_ExtMsgBox($MB_ICONINFORMATION, BitOR($MB_ICONQUESTION, $MB_OKCANCEL, $MB_DEFBUTTON2), $sTitle, $sMessage)

$sTitle = "Example 2 title"
$sMessage = "Example 2 message"
; Embedded ? icon overrides the standalone warning icon
_ExtMsgBox($MB_ICONWARNING, BitOR($MB_YESNOCANCEL, $MB_DEFBUTTON3, $MB_ICONQUESTION), $sTitle, $sMessage)

$sTitle = "Example 3 title"
$sMessage = "Example 3 message"
; Only embedded
_ExtMsgBox(0, BitOR($MB_OK, $MB_DEFBUTTON1, $MB_ICONINFORMATION), $sTitle, $sMessage)

$sTitle = "Example 4 title"
$sMessage = "Example 4 message"
; Only standalone
_ExtMsgBox($MB_ICONWARNING, BitOR($MB_OK, $MB_DEFBUTTON1), $sTitle, $sMessage)

$sTitle = "Example 5 title"
$sMessage = "Example 5 message"
; UAC
_ExtMsgBox(8, BitOR($MB_OK, $MB_DEFBUTTON1), $sTitle, $sMessage)

$sTitle = "Example 6 title"
$sMessage = "Example 6 message"
; Countdown
_ExtMsgBox(128, BitOR($MB_OK, $MB_DEFBUTTON1), $sTitle, $sMessage, 10)

At present an icon constant embedded in the button parameter overrides the main icon parameter. Should it be that way around or should it be the reverse?

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

15 hours ago, Melba23 said:

I do not think having a single $hFlag parameter is feasible as the various parameters melded by BitOR used by the OP are split into different parameters across 2 functions (_ExtMsgBox & _ExtMsgBoxSet) and rewriting the UDF to deal with but a single parameter would likely break a lot of existing scripts.

Apologies if my original statement was vague, what I was trying to say was just to add the bit-melded parameter $hFlag as an optional last arg of _ExtMsgBox(), and default it to “”.  That way it shouldn’t break any scripts.

Only in the case of a value being passed would it affect anything, and in such a case it would use similar logic as is in your example script to unmeld the parameters and put the corresponding values in the separate parameters.

That way you could encapsulate the logic of the example script into your UDF.  

I use MsgBox all the time, but like the _Ext better.  If EMB had this MsgBox compatible option argument, I could search and replace all my MsgBox calls with EMB calls without needing anything else.

Anyway, it was just a thought and of course you know better than anyone what is needed by the EMB community.

Code hard, but don’t hard code...

Link to comment
Share on other sites

  • Melba23 changed the title to Extended Message Box - New Version: 16 Feb 24

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   1 member

×
×
  • Create New...