Jump to content

Recommended Posts

Posted

Is it possible to add a scrollbar to a MsgBox()?

Quite often I run simple scripts and use

ClipPut(Fileread("file"))
MsgBox(0, "Results", ClipGet())
to display the results. Sometimes though, the resulting MsgBox is slightly too big for the screen.

I know I can use other methods to display the output, but I like the simplicity of MsgBox()

Thanks

[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Posted

I think you'll need to create a custom gui that looks like a message box, I've tried this before which is why im replying and I'd like to know if anyone's done this but I highly doubt it.

Also, one thing you'll notice is that when creating a pseudo message box, you'll find that removing the gui icon on the top left corner is difficult, I've yet to find out how some people are doing it in programs I've came across and it's still something I'm looking into.

Posted

Haven't tried it myself but maybe Melba's can help.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Nope, you have to create your own GUI. Perhaps an Edit control would be appropriate.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted

Also, one thing you'll notice is that when creating a pseudo message box, you'll find that removing the gui icon on the top left corner is difficult, I've yet to find out how some people are doing it in programs I've came across and it's still something I'm looking into.

Find a GUI that does it, then use winfo to get the styles and extended styles. Look at the constants and convert the value in to the flags that are set, then see what you get ;)
Posted

Find a GUI that does it, then use winfo to get the styles and extended styles. Look at the constants and convert the value in to the flags that are set, then see what you get :)

Just tried and it didn't work :(

GUICreate("Test data",100,100,-1,-1,0x14C800CC,0x00010101)
GUISetState()
Sleep(3000)
Posted (edited)

This? I believe I found it ages ago by Yashied Rover, though didn't save the URL link.

#include <APIConstants.au3>
#include <GUIConstantsEx.au3>
#include <WinAPIEx.au3> ; www.autoitscript.com/forum/topic/98712-winapiex-udf/

Example()

Func Example()
    Local $hGUI = _GUICreate_NoIcon("_GUICreate_NoIcon()")
    GUICtrlCreateLabel("Example Label", 10, 10, 150, 25)
    GUISetState(@SW_SHOW, $hGUI)

    While 1
        If GUIGetMsg() = $GUI_EVENT_CLOSE Then
            ExitLoop
        EndIf
    WEnd
    GUIDelete($hGUI)
EndFunc   ;==>Example

Func _GUICreate_NoIcon($sTitle = "", $iWidth = -1, $iHeight = -1, $iXpos = -1, $iYpos = -1)
    Local $hGUI = GUICreate($sTitle, $iWidth, $iHeight, $iXpos, $iYpos, BitOR($WS_CAPTION, $WS_SYSMENU), $WS_EX_DLGMODALFRAME)
    Local $hIcon = _WinAPI_GetClassLongEx($hGUI, $GCL_HICON)
    _WinAPI_DestroyIcon($hIcon)
    _WinAPI_SetClassLongEx($hGUI, $GCL_HICON, 0)
    _WinAPI_SetClassLongEx($hGUI, $GCL_HICONSM, 0)
    Return $hGUI
EndFunc   ;==>_GUICreate_NoIcon
Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted

Whoops, Rover >>

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted (edited)

This? I believe I found it ages ago by Yashied Rover, though didn't save the URL link.

#include <APIConstants.au3>
#include <GUIConstantsEx.au3>
#include <WinAPIEx.au3> ; www.autoitscript.com/forum/topic/98712-winapiex-udf/

Example()

Func Example()
    Local $hGUI = _GUICreate_NoIcon("_GUICreate_NoIcon()")
    GUICtrlCreateLabel("Example Label", 10, 10, 150, 25)
    GUISetState(@SW_SHOW, $hGUI)

    While 1
        If GUIGetMsg() = $GUI_EVENT_CLOSE Then
            ExitLoop
        EndIf
    WEnd
    GUIDelete($hGUI)
EndFunc   ;==>Example

Func _GUICreate_NoIcon($sTitle = "", $iWidth = -1, $iHeight = -1, $iXpos = -1, $iYpos = -1)
    Local $hGUI = GUICreate($sTitle, $iWidth, $iHeight, $iXpos, $iYpos, BitOR($WS_CAPTION, $WS_SYSMENU), $WS_EX_DLGMODALFRAME)
    Local $hIcon = _WinAPI_GetClassLongEx($hGUI, $GCL_HICON)
    _WinAPI_DestroyIcon($hIcon)
    _WinAPI_SetClassLongEx($hGUI, $GCL_HICON, 0)
    _WinAPI_SetClassLongEx($hGUI, $GCL_HICONSM, 0)
    Return $hGUI
EndFunc   ;==>_GUICreate_NoIcon

:D

Awesome! wish you would have posted that when I made I've still been looking for this all this time!

Edited by ApudAngelorum
Posted

I was there, no I idea why I didn't provided this. Oh well you've only been waiting 2 months, I have a few questions still unanswered, no biggy though I found workarounds.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

  • 2 years later...
Posted

Thanks very much for the code but not sure how to implement it.  It looks like it creates a Main Window and not a popup dialog box with a label but not a long string.  How is it a replacement to a MsgBox with extra text.

Normally I would use the following to add text to a message box:

MsgBox($MB_SYSTEMMODAL,"Title",$myReallyLongString)
Posted

Hi

Maybe:

#include <APIConstants.au3>
#include <GUIConstantsEx.au3>
#include <WinAPIEx.au3> ; www.autoitscript.com/forum/topic/98712-winapiex-udf/

Example()

Func Example()
    Local $hGUI = _GUICreate_NoIcon("Title Goes Here!!!")
    $Label = GUICtrlCreateLabel("My $myReallyLongString goes here", 10, 10, 150, 25)
    $Button = GUICtrlCreateButton("Ok", 90, 120, 50, 50)
    GUISetState(@SW_SHOW, $hGUI)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop

            Case $Button
                MsgBox(0, '', 'Button Ok pressed!', .5)

            Case $Label
                MsgBox(0, '', 'Label pressed!', .5)
        EndSwitch
    WEnd
    GUIDelete($hGUI)
EndFunc   ;==>Example

Func _GUICreate_NoIcon($sTitle = "", $iWidth = -1, $iHeight = -1, $iXpos = -1, $iYpos = -1)
    Local $hGUI = GUICreate($sTitle, $iWidth, $iHeight, $iXpos, $iYpos, BitOR($WS_CAPTION, $WS_SYSMENU), $WS_EX_DLGMODALFRAME)
    Local $hIcon = _WinAPI_GetClassLongEx($hGUI, $GCL_HICON)
    _WinAPI_DestroyIcon($hIcon)
    _WinAPI_SetClassLongEx($hGUI, $GCL_HICON, 0)
    _WinAPI_SetClassLongEx($hGUI, $GCL_HICONSM, 0)
    Return $hGUI
EndFunc   ;==>_GUICreate_NoIcon
  • Moderators
Posted

Well, you certainly "can" put scrolls on a MessageBox, but I haven't tested getting them to work yet.

A proof of concept using code borrowed from my >MsgBox UDF:

#include <WinAPI.au3>
#include <WindowsConstants.au3>

Global $__ghMsgBoxHook = 0
Global $__giMsgBoxMaxWidth = 640
Global $__giMsgBoxMaxHeight = 300

_MsgBox(64 + 6, "Example", ClipGet())

Func _MsgBox($iFlag, $sTitle, $sText, $iTimeout = 0, $hWnd = 0)

    Local $hCB = DllCallbackRegister("_CBT_MsgBoxProc", "lresult", "int;wparam;lparam")
    Local $pCB = DllCallbackGetPtr($hCB)

    $__ghMsgBoxHook = _WinAPI_SetWindowsHookEx($WH_CBT, $pCB, 0, _WinAPI_GetCurrentThreadId())

    Local $i_ret = MsgBox($iFlag, $sTitle, $sText, $iTimeout, $hWnd)

    If $__ghMsgBoxHook Then _WinAPI_UnhookWindowsHookEx($__ghMsgBoxHook)
    DllCallbackFree($hCB)

    Return $i_ret
EndFunc   ;==>_MsgBox

Func _CBT_MsgBoxProc($iMsg, $wParam, $lParam)

    Local $hMsgbox = HWnd($wParam)
    Local $iLong, $aWPos, $hStatic, $aCPos
    Local $iLeft, $iTop
    Local $hButton, $iEnum = 1
    Local $iHeight = $__giMsgBoxMaxHeight
    Local $iWidth = $__giMsgBoxMaxWidth

    Switch $iMsg
        Case 5; H_CBT_ACTIVATE

            $aWPos = WinGetPos($hMsgbox)
            If IsArray($aWPos) And ($aWPos[2] > $iWidth Or $aWPos[3] > $iHeight) Then
                $hStatic = ControlGetHandle($hMsgbox, "", "Static3")
                $aCPos = ControlGetPos($hMsgbox, "", $hStatic)

                $iLong = _WinAPI_GetWindowLong($hStatic, $GWL_STYLE)
                _WinAPI_SetWindowLong($hStatic, $GWL_STYLE, BitOR($iLong, $WS_HSCROLL, $WS_VSCROLL))
                _WinAPI_SetWindowLong($hStatic, $GWL_EXSTYLE, $WS_EX_CLIENTEDGE)

                $iWidth = (($aWPos[2] > $iWidth) ? $iWidth : $aWPos[2])
                $iHeight = (($aWPos[3] > $iHeight) ? $iHeight : $aWPos[3])
                $iLeft = $aWPos[2] - $iWidth
                $iTop = $aWPos[3] - $iHeight
                
                WinMove($hMsgbox, 0, $aWPos[0], $aWPos[1], $iWidth, $iHeight)
                ControlMove($hMsgbox, "", $hStatic, $aCPos[0], $aCPos[1], $aCPos[2] - $iLeft, $aCPos[3] - $iTop)
                While 1
                    $hButton = ControlGetHandle($hMsgbox, "", "Button" & $iEnum)
                    If Not IsHWnd($hButton) Then ExitLoop
                    $aCPos = ControlGetPos($hMsgbox, "", $hButton)
                    ControlMove($hMsgbox, "", $hButton, $aCPos[0] - $iLeft, $aCPos[1] - $iTop, $aCPos[2], $aCPos[3])
                    $iEnum += 1
                WEnd
            EndIf

            _WinAPI_UnhookWindowsHookEx($__ghMsgBoxHook)
            $__ghMsgBoxHook = 0

            Return 0
    EndSwitch

    Return _WinAPI_CallNextHookEx($__ghMsgBoxHook, $iMsg, $wParam, $lParam)
EndFunc   ;==>_CBT_MsgBoxProc

.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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
  • Recently Browsing   0 members

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