Jump to content

_GUIRegisterMsgEx() UDF - Register multiple functions with GUIRegisterMsg()


guinness
 Share

Recommended Posts

Well I hope you learnt something today!

 

Yes.

How to do script in a better way in comparision to my "attempt at creating something closely related to what was requested" ;)

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

I meant it as no disrespect to your UDF.

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

Link to comment
Share on other sites

I do not have anything too bad, just saying that your UDF is better.
And in this process as I analyze your code to learn something new.

No offense.

Regards
mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

None taken on both sides.

This is a >good read on creating code without global variables. I also created >code myself with the approach I use these days in AutoIt. Hopefully it will give you and others some inspiration too.

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

Link to comment
Share on other sites

@guinness

Really the way you did with static variable is better, no doubt!

Avoids conflicts and variables with huge names just to no have conflict with others.

JS

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Link to comment
Share on other sites

I hope that isn't sarcasm JScript.

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

Link to comment
Share on other sites

I hope that isn't sarcasm JScript.

And why should it be? I'm sorry but I'm not a man to half words and do not even like that kind of thing!

Look for some my topic when I was acting in this way, if you find I assure you that I never log on here!

JS

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Link to comment
Share on other sites

Haha, OK I believe you. Thanks for your words then. I too feel this UDF was well structured and thought out.

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

Link to comment
Share on other sites

I'm glad you understand, I just want to make clear that, as everyone knows, here is a forum with international reach, not all can write in English and some things that can be understood in a nice way in a particular country, in other countries may be an offense!

JS

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Link to comment
Share on other sites

It's also a forum where miscommunication can easily take place and I am not known for using lots of smiley icons to convey when I am joking or not, so sometimes this can land me in hot water (not literally of course.)

JScript, imagine there is a smiley face at the end of post #46.

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

Link to comment
Share on other sites

None taken on both sides.

....

Hopefully it will give you and others some inspiration too.

I'm glad we understand each other.

.........

I always inspires me, smart people work.

 

I'm glad you understand, I just want to make clear that, as everyone knows, here is a forum with international reach, not all can write in English and some things that can be understood in a nice way in a particular country, in other countries may be an offense!

 

Your statement fits my personality perfectly, and therefore I ask that others have had this in mind, in the case when I write something that might be perceived wrong.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

  • 10 months later...

some proposals:

; Initial idea by mLipok: http://www.autoitscript.com/forum/topic/162515-guiregistermsg-udf/
; Compared to mine mLipok's idea was limited to a certain set of WM_MESSAGES and would call all the registered functions.
; This UDF works as was suggested in the Trac Tickets: #2624 & #2629, where each WM_MESSAGE is associated with a function.
; It's basically allowing GUIRegisterMsg() to register multiple messages.

#Region _GUIRegisterMsgEx.au3 - Options and Includes.
#Tidy_Parameters=/sort_funcs /reel
#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7

#include-once
#include <GUIConstants.au3>
#include <StringConstants.au3>
#include <WindowsConstants.au3>
#EndRegion _GUIRegisterMsgEx.au3 - Options and Includes.

#Region _GUIRegisterMsgEx.au3 - Variable Declaration.
Global Const $GUIREGISTERMSGEX_GUID = 'E5D40BB9-0B3F-4515-8A75-225A9C3E9B43'
Global Enum $GUIREGISTERMSGEX_ADD = 1025, $GUIREGISTERMSGEX_DELETE ; 1025 = $WM_USER + 1
Global Const $GUIREGISTERMSGEX = 0
Global Enum $GUIREGISTERMSGEX_FIRSTCOL_INDEX, $GUIREGISTERMSGEX_MESSAGEINDEX, $GUIREGISTERMSGEX_FIRSTROW_INDEX
Global Enum $GUIREGISTERMSGEX_COLUMN_UBOUND, $GUIREGISTERMSGEX_ID, $GUIREGISTERMSGEX_INDEX, $GUIREGISTERMSGEX_RESETCOUNT, $GUIREGISTERMSGEX_ROW_UBOUND, $GUIREGISTERMSGEX_MESSAGESTRING, $GUIREGISTERMSGEX_MAX
Global Const $GUIREGISTERMSGEX_CALL_ERROR = 0xDEAD
Global Const $GUIREGISTERMSGEX_CALL_PARAMS = 0xBEEF
Global $g__fnGUIREGISTERMSGEX_CALLBACK_WRONG_PARAM_ALERT ; mLipok - addded to catch up incorrect Parameters # in called Function
#EndRegion _GUIRegisterMsgEx.au3 - Variable Declaration.

#Region _GUIRegisterMsgEx.au3 - Example usage.

; Run example only if not compiled and runing UDF not as other script
If Not @Compiled And @ScriptName = '_GUIRegisterMsgEx.au3' Then _Example()

Func _Example() ; By Melba23 , modified by mLipok (added buttons and func for catch incorrect number of parameters)
    Local $hGUI = GUICreate('Test', 500, 500)
    Local $idButton_R1 = GUICtrlCreateButton('Reg 1', 10, 10, 80, 30)
    Local $idButton_U1 = GUICtrlCreateButton('UnReg 1', 100, 10, 80, 30)
    GUICtrlCreateLabel('ConsoleWrite ''1'' if mouse moved', 200, 20, 300, 20)
    Local $idButton_R2 = GUICtrlCreateButton('Reg 2', 10, 50, 80, 30)
    Local $idButton_U2 = GUICtrlCreateButton('UnReg 2', 100, 50, 80, 30)
    GUICtrlCreateLabel('ConsoleWrite ''2'' if mouse moved', 200, 60, 300, 20)
    Local $idButton_R3 = GUICtrlCreateButton('Reg 3', 10, 90, 80, 30)
    Local $idButton_U3 = GUICtrlCreateButton('UnReg 3', 100, 90, 80, 30)
    GUICtrlCreateLabel('ConsoleWrite ''Left'' if left button pressed', 200, 100, 300, 20)
    Local $idButton_R4 = GUICtrlCreateButton('Reg 4', 10, 130, 80, 30)
    Local $idButton_U4 = GUICtrlCreateButton('UnReg 4', 100, 130, 80, 30)
    GUICtrlCreateLabel('ConsoleWrite ''Right'' if right button pressed', 200, 140, 300, 20)
    Local $idButton_R5 = GUICtrlCreateButton('Reg 5', 10, 170, 80, 30)
    Local $idButton_U5 = GUICtrlCreateButton('UnReg 5', 100, 170, 80, 30)
    GUICtrlCreateLabel('ConsoleWrite ''Param#'' if left button DoubleClick and incorrect Param# in called func', 200, 170, 300, 40)

    GUISetState(@SW_SHOW, $hGUI)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop

            Case $idButton_R1
                _GUIRegisterMsgEx($WM_MOUSEMOVE, _Move_1)
                ConsoleWrite(@CRLF)

            Case $idButton_U1
                _GUIRegisterMsgEx($WM_MOUSEMOVE, _Move_1, True)
                ConsoleWrite(@CRLF)

            Case $idButton_R2
                _GUIRegisterMsgEx($WM_MOUSEMOVE, _Move_2)
                ConsoleWrite(@CRLF)

            Case $idButton_U2
                _GUIRegisterMsgEx($WM_MOUSEMOVE, _Move_2, True)
                ConsoleWrite(@CRLF)

            Case $idButton_R3
                _GUIRegisterMsgEx($WM_LBUTTONDOWN, _Press_1)
                ConsoleWrite(@CRLF)

            Case $idButton_U3
                _GUIRegisterMsgEx($WM_LBUTTONDOWN, _Press_1, True)
                ConsoleWrite(@CRLF)

            Case $idButton_R4
                _GUIRegisterMsgEx($WM_RBUTTONDOWN, _Press_2)
                ConsoleWrite(@CRLF)

            Case $idButton_U4
                _GUIRegisterMsgEx($WM_RBUTTONDOWN, _Press_2, True)
                ConsoleWrite(@CRLF)

            Case $idButton_R5
                $g__fnGUIREGISTERMSGEX_CALLBACK_WRONG_PARAM_ALERT = _UnexpectedParamAlert
                _GUIRegisterMsgEx($WM_LBUTTONDBLCLK, _LBUTTONDBLCLK)
                ConsoleWrite(@CRLF)

            Case $idButton_U5
                $g__fnGUIREGISTERMSGEX_CALLBACK_WRONG_PARAM_ALERT = ''
                _GUIRegisterMsgEx($WM_LBUTTONDBLCLK, _LBUTTONDBLCLK, True)
                ConsoleWrite(@CRLF)

        EndSwitch
    WEnd
    GUIDelete($hGUI)
EndFunc   ;==>_Example

Func _LBUTTONDBLCLK($hWnd, $iMsg, $wParam, $lParam, $vSomeUnexpectedParam)
    #forceref $hWnd, $iMsg, $wParam, $lParam, $vSomeUnexpectedParam
    ConsoleWrite(' _LBUTTONDBLCLK ')
EndFunc   ;==>_LBUTTONDBLCLK

#cs
    _GUIRegisterMsgEx($WM_COMMAND, DummyFunction) ; Register DummyFunction() when WM_COMMAND is called.

    _GUIRegisterMsgEx($WM_COPYDATA, DummyFunction)
    _GUIRegisterMsgEx($WM_COPYDATA, DummyFunction) ; Duplicates won't be added to the GUIRegisterMsg().
    _GUIRegisterMsgEx($WM_COPYDATA, SomeFunc)

    _GUIRegisterMsgEx($WM_COPYDATA, DummyFunction, True) ; Unregister the WM_COPYDATA message to call DummyFunction()

    _GUIRegisterMsgEx($WM_SIZE, DummyFunction)
    _GUIRegisterMsgEx($WM_SIZE, SomeFunc)
    _GUIRegisterMsgEx($WM_SIZE, DummyFunction, True) ; Unregister the $WM_SIZE message to call DummyFunction()
    _GUIRegisterMsgEx($WM_SIZE, DummyFunction)

    Func DummyFunction()
    EndFunc   ;==>DummyFunction

    Func SomeFunc()
    EndFunc   ;==>SomeFunc
#ce

Func _Move_1($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam, $lParam
    ConsoleWrite('1')
EndFunc   ;==>_Move_1

Func _Move_2($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam, $lParam
    ConsoleWrite('2')
EndFunc   ;==>_Move_2

Func _Press_1($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam, $lParam
    ConsoleWrite(' Left ')
EndFunc   ;==>_Press_1

Func _Press_2($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam, $lParam
    ConsoleWrite(' Right ')
EndFunc   ;==>_Press_2

Func _UnexpectedParamAlert()
    ConsoleWrite(' PARAM# ')
EndFunc   ;==>_UnexpectedParamAlert
#EndRegion _GUIRegisterMsgEx.au3 - Example usage.

#Region _GUIRegisterMsgEx.au3 - Functions.
; #INTERNAL_USE_ONLY# ===========================================================================================================
; Name ..........: __GUIRegisterMsgEx_EVENTPROC
; Description ...:
; Syntax ........: __GUIRegisterMsgEx_EVENTPROC($hWnd, $iMsg, $wParam, $lParam)
; Parameters ....: $hWnd                - a handle value.
;                  $iMsg                - an integer value.
;                  $wParam              - an unknown value.
;                  $lParam              - an unknown value.
; Return values .: None
; Author ........: guinness
; Modified ......: mLipok
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: No
; ===============================================================================================================================
Func __GUIRegisterMsgEx_EVENTPROC($hWnd, $iMsg, $wParam, $lParam) ; $hWnd = Func, $iMsg = Windows (WM) message, $wParam = Internal message.
    Local Static $aStorage[$GUIREGISTERMSGEX_FIRSTROW_INDEX][$GUIREGISTERMSGEX_MAX] ; Internal array for storing the WM_MESSAGE and the associated function to call.

    If Not ($aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_ID] = $GUIREGISTERMSGEX_GUID) Then ; Initialise the internal array.

        $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_ID] = $GUIREGISTERMSGEX_GUID

        $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_INDEX] = 0

        $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_RESETCOUNT] = 0

        $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_COLUMN_UBOUND] = $GUIREGISTERMSGEX_MAX
        $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_ROW_UBOUND] = $GUIREGISTERMSGEX_FIRSTROW_INDEX

        $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_MESSAGESTRING] = '|'
    EndIf

    Local $iIndex = Int(StringRegExp($aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_MESSAGESTRING] & '|' & Int($iMsg) & '*-1|', '\|' & Int($iMsg) & '\*(\-?\d+)\|', $STR_REGEXPARRAYGLOBALMATCH)[0])

    ; mLipok - added "If IsFunc($hWnd) Then" to be sure that $GUIREGISTERMSGEX_ADD $GUIREGISTERMSGEX_DELETE are not $wParam frome some Event
    If IsFunc($hWnd) Then
        Switch $wParam
            Case $GUIREGISTERMSGEX_ADD
                If $iIndex < 0 Then
                    $iIndex = $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_INDEX]
                    $aStorage[$GUIREGISTERMSGEX_MESSAGEINDEX][$iIndex] = $GUIREGISTERMSGEX_MESSAGEINDEX
                    $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_MESSAGESTRING] &= Int($iMsg) & '*' & $iIndex & '|'
                    $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_INDEX] += 1
                    GUIRegisterMsg($iMsg, __GUIRegisterMsgEx_EVENTPROC) ; Register the message. Note: Once registered this function will always be associated with that message.
                EndIf

                Local $bIsDelegateExists = False
                For $i = $GUIREGISTERMSGEX_FIRSTROW_INDEX To $aStorage[$GUIREGISTERMSGEX_MESSAGEINDEX][$iIndex] ; Row count.
                    If $aStorage[$i][$iIndex] = $hWnd Then
                        $bIsDelegateExists = True
                        ExitLoop
                    EndIf
                Next

                If Not $bIsDelegateExists Then
                    $aStorage[$GUIREGISTERMSGEX_MESSAGEINDEX][$iIndex] += 1 ; Increase the count of the message column.

                    Local $bIsColAdd = ($iIndex + 1) >= $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_COLUMN_UBOUND], _ ; Re-size the internal array.
                            $bIsRowAdd = $aStorage[$GUIREGISTERMSGEX_MESSAGEINDEX][$iIndex] >= $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_ROW_UBOUND]

                    If $bIsColAdd Or $bIsRowAdd Then ; Re-size the internal storage if required.
                        If $bIsColAdd Then $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_COLUMN_UBOUND] = Ceiling($iIndex * 1.3)
                        If $bIsRowAdd Then $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_ROW_UBOUND] = Ceiling($aStorage[$GUIREGISTERMSGEX_MESSAGEINDEX][$iIndex] * 1.3)
                        ReDim $aStorage[$aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_ROW_UBOUND]][$aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_COLUMN_UBOUND]]
                    EndIf
                    $aStorage[$aStorage[$GUIREGISTERMSGEX_MESSAGEINDEX][$iIndex]][$iIndex] = $hWnd
                EndIf
                Return Not $bIsDelegateExists

            Case $GUIREGISTERMSGEX_DELETE
                Local $bIsDeleted = False
                If $iIndex >= 0 Then
                    For $i = $GUIREGISTERMSGEX_FIRSTROW_INDEX To $aStorage[$GUIREGISTERMSGEX_MESSAGEINDEX][$iIndex] ; Row count.
                        If $aStorage[$i][$iIndex] = $hWnd Then
                            $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_RESETCOUNT] += 1
                            $aStorage[$i][$iIndex] = Null
                            $bIsDeleted = True
                        EndIf
                    Next
                    If $bIsDeleted And $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_RESETCOUNT] >= 0 Then ; Tidy the internal array by removing empty values.
                        Local $iCurrentIndex = $GUIREGISTERMSGEX_FIRSTROW_INDEX
                        For $i = $GUIREGISTERMSGEX_FIRSTCOL_INDEX To $aStorage[$GUIREGISTERMSGEX][$GUIREGISTERMSGEX_INDEX] - 1 ; Column count.
                            For $j = $GUIREGISTERMSGEX_FIRSTROW_INDEX To $aStorage[$GUIREGISTERMSGEX_MESSAGEINDEX][$i]
                                If $aStorage[$j][$i] = Null Then
                                    $aStorage[$GUIREGISTERMSGEX_MESSAGEINDEX][$i] -= 1
                                    ContinueLoop
                                EndIf
                                $aStorage[$iCurrentIndex][$i] = $aStorage[$j][$i]
                                $iCurrentIndex += 1
                            Next
                            $iCurrentIndex = $GUIREGISTERMSGEX_FIRSTROW_INDEX
                        Next
                    EndIf
                EndIf
                Return $bIsDeleted

        EndSwitch
    Else
        If $iIndex >= 0 And $aStorage[$GUIREGISTERMSGEX_MESSAGEINDEX][$iIndex] >= $GUIREGISTERMSGEX_FIRSTROW_INDEX Then
            For $i = $GUIREGISTERMSGEX_FIRSTROW_INDEX To $aStorage[$GUIREGISTERMSGEX_MESSAGEINDEX][$iIndex] ; Row count.
                ; If IsFunc($aStorage[$i][$iIndex]) Then
                ; $aStorage[$i][$iIndex]($hWnd, $iMsg, $wParam, $lParam) ; Execute the registered functions.
                ; EndIf
                If IsFunc($aStorage[$i][$iIndex]) Then
                    Call($aStorage[$i][$iIndex], $hWnd, $iMsg, $wParam, $lParam)
                    If (@error = $GUIREGISTERMSGEX_CALL_ERROR And @extended = $GUIREGISTERMSGEX_CALL_PARAMS) Then
                        Call($aStorage[$i][$iIndex], $hWnd, $iMsg, $wParam)
                        If (@error = $GUIREGISTERMSGEX_CALL_ERROR And @extended = $GUIREGISTERMSGEX_CALL_PARAMS) Then
                            Call($aStorage[$i][$iIndex], $hWnd, $iMsg)
                            If (@error = $GUIREGISTERMSGEX_CALL_ERROR And @extended = $GUIREGISTERMSGEX_CALL_PARAMS) Then
                                Call($aStorage[$i][$iIndex], $hWnd)
                                If (@error = $GUIREGISTERMSGEX_CALL_ERROR And @extended = $GUIREGISTERMSGEX_CALL_PARAMS) Then
                                    Call($aStorage[$i][$iIndex])
                                    ; mLipok - addded additional check for @error to catch up incorrect Parameters # in called Function
                                    If (@error = $GUIREGISTERMSGEX_CALL_ERROR And @extended = $GUIREGISTERMSGEX_CALL_PARAMS) Then
                                        If IsFunc($g__fnGUIREGISTERMSGEX_CALLBACK_WRONG_PARAM_ALERT) Then $g__fnGUIREGISTERMSGEX_CALLBACK_WRONG_PARAM_ALERT()
                                    EndIf
                                EndIf
                            EndIf
                        EndIf
                    EndIf
                EndIf
            Next
        EndIf
    EndIf

    Return $GUI_RUNDEFMSG
EndFunc   ;==>__GUIRegisterMsgEx_EVENTPROC

; #FUNCTION# ====================================================================================================================
; Name ..........: _GUIRegisterMsgEx
; Description ...:
; Syntax ........: _GUIRegisterMsgEx($iWM_MESSAGE, $fuDelegate[, $bIsUnRegister = False])
; Parameters ....: $iWM_MESSAGE         - an integer value.
;                  $fuDelegate          - function (first class object).
;                  $bIsUnRegister       - [optional] a boolean value. Default is False.
; Return values .: None
; Author ........: guinness
; Modified ......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: No
; ===============================================================================================================================
Func _GUIRegisterMsgEx($iWM_MESSAGE, $fuDelegate, $bIsUnRegister = False) ; Returns True or False.
    Return __GUIRegisterMsgEx_EVENTPROC($fuDelegate, $iWM_MESSAGE, ($bIsUnRegister ? $GUIREGISTERMSGEX_DELETE : $GUIREGISTERMSGEX_ADD), Null)
EndFunc   ;==>_GUIRegisterMsgEx
#EndRegion _GUIRegisterMsgEx.au3 - Functions.

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

Thanks

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

Link to comment
Share on other sites

  • 3 months later...

It was well over a year since this was last looked at, I therefore provided some minor updates, though nothing major though. Plus this is more of a proof of concept than anything.

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

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...