kcvinu

A little Tool for creating GUIRegisterMsg Function

11 posts in this topic

#1 ·  Posted (edited)

  Hi all,

I know this is a crazy idea. But i think it might be a help for somebody. The name of this program is GRM Helper. i.e. GUIRegisterMsg Helper. 

This program helps you to write the guiregistermsg function code automatically. You can choose a control from the combo box. Then all events of that control will be displayed in a list view. You can click on an event for it;s details. Then you can check the events which you want to include in your code. Then type some details like; 1) Your control's handle. 2) Line number for inserting GUIRegisterMsg code. 3) Line number for inserting main function.

And press the "Isert To SciTE" button. Your code is ready in scite.

 

Here is the program.

Updated Version 1.1

GRM Helper V1.1.zip

 

 

000114.jpg

The code written by this program.

GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")

Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg
    Local $hWndFrom, $iIDFrom, $iCode, $hWndListBox
    If Not IsHWnd($Sample) Then $hWndListBox = GUICtrlGetHandle($Sample)
    $hWndFrom = $lParam
    $iIDFrom = BitAND($wParam, 0xFFFF) ; Low Word
    $iCode = BitShift($wParam, 16) ; Hi Word

    Switch $hWndFrom
        Case  $Sample, $hWndListBox
            Switch $iCode
                Case $LBN_ERRSPACE
                    ; Insert your code here
                    
                Case $LBN_SELCHANGE
                    ; Insert your code here
                    
                Case $LBN_DBLCLK
                    ; Insert your code here
                    
                Case $LBN_SELCANCEL
                    ; Insert your code here
                    
                
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_COMMAND

 

 

Edited by kcvinu
Adding Extra info
2 people like this

My Contributions

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Share this post


Link to post
Share on other sites



Would you be able to provide a ZIP instead, as not everyone has WinRAR or 7-Zip. Thanks.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_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: 04/09/2015

Share this post


Link to post
Share on other sites

@guinness Sure. :)

 


My Contributions

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Share this post


Link to post
Share on other sites

@argumentum Thanks for the comment. It is possible but the problem is, there is no descrption for all events in contsant files. I have made an array to put events and descriptions. And i made that arry not by typing. I did that with the help of an autoit script. So if that script didn't found any description in constant file, it will add "No descriptions available." to the array. Unfortunately almost half of the events have no descriptions. And i think it should create manually.Anyway, i will look into it.


My Contributions

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Share this post


Link to post
Share on other sites

@argumentum Thanks for the comment. It is possible but the problem is, there is no descrption for all events in contsant files. I have made an array to put events and descriptions. And i made that arry not by typing. I did that with the help of an autoit script. So if that script didn't found any description in constant file, it will add "No descriptions available." to the array. Unfortunately almost half of the events have no descriptions. And i think it should create manually.Anyway, i will look into it.

...maybe the array can be loaded from an external file holding the descriptions. The descriptions can be added by collaboration of all those wising to participate. The info can be found in MSDN ( https://msdn.microsoft.com/en-us/library/windows/desktop/ff485968(v=vs.85).aspx for List Box Notifications, etc. ) and added to the structure of the descriptions file that you'd create. In my take at Script-o-matic you can see an example of how helpful can be to have the info. right there. 
It would be of great aid, to have the code generator, supply a guide for the casual coder ( like me ), that don't have a good grasp on these.
In any case thanks for sharing this tool @kcvinu .

1 person likes this

Share this post


Link to post
Share on other sites

@argumentum Thanks for the link. I think i can manually type missing descriptions from the MSDN page. 

1 person likes this

My Contributions

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

GRM helper is updated to version 1.1  Check for the link in Post 1

Changes. 

1. Addedd as much event details. But still some are missing. I couldn't find details of Menu events. yet.

2. Corrects some minor code intedation problems. 

3. Addedd events for GUICtrlInput. This was not in version 1

4. Help file changed. An image replaced old msg box.

That's all for now. 

Edited by kcvinu
1 person likes this

My Contributions

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Share this post


Link to post
Share on other sites

@spudw2k Thank you :)


My Contributions

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Share this post


Link to post
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

  • Similar Content

    • Hoth2001
      By Hoth2001
      I installed AutoIt to my computer 3 days ago...and have invested the last 3 days learning how to use it.
      As learned in the tutorials, whenever opening I new file in Scite editor I'd immediatley save the file
      I left the Scite Editor open for the past 3 consecutive days on my laptop
       
      No problem
       
      Today I closed Autoit for the first time, restarted my computer, and opened up the Scite Editor
      Now whenever I try to save a file I am prevented from doing so because I apparently don't have permission!?  
      And whenever I try to run any of the programs I've created over the past 3 days now I keep getting annoying popup notifications before I run them
       
      Problem
       
      To go around the issue, I copied a program originally saved in the AUtoIt folder to another folder (since I was barred from saving it in it's original AutoIt location)
      NOw when I run the code the mouse coordiantes are all off
      and I still get that pesky notification whenever I try to run a program
       
      Big Problem!!!
      Anyone have any clue why I'm going through this BS?
       
      1. I checked my User settings and YES I am the administrator on this cpu
      2. I tried to de-select the "read only" attribute for the AutoIt folder (everytime after doing this successfully the folder immediately and automatically reverts back to "read only")
       
      Any help would be MOST appreciated. I've attached screen shots of the annoying bus I keep getting
       
       


    • Skysnake
      By Skysnake
      Hi
      Best example I could find is here
      ::/html/libfunctions/_GUICtrlTreeView_ClickItem.htm
      The way I understand this, the standard Windows messages, such as Left/Right Click etc are covered by AutoIt macros, but the real power is locked up inside this WM_NOTIFY .  I have tried, but I am not even sure I understand what I am looking at.
      I need help understanding this.  What I am looking for is Help file or Tutorial explaining how this works?  
      Perhaps if there is a script showing both the working of an AutoIt macro and the WM_NOTIFY  in action, it would help.
      Right now I am so lost, I do not even know what are the right questions to ask.  One issue I have is on ListViews, how to combine the "Click" of a line with a standard Switch loop?  Like users clicks a line, then get the loop to detect the click and ;do something ...
      Any ideas?
      Skysnake
    • algiuxas
      By algiuxas
      Hello everybody!
      I get these weird errors in SciTE console:
      [0801/210405:ERROR:tcp_socket_win.cc(335)] bind() returned an error: Only one usage of each socket address (protocol/network address/port) is normally permitted. (0x2740) [0801/210405:ERROR:devtools_http_handler.cc(229)] Cannot start http server for devtools. Stop devtools. [0801/210405:ERROR:browser_gpu_channel_host_factory.cc(119)] Failed to launch GPU process. [0801/210405:ERROR:browser_gpu_channel_host_factory.cc(119)] Failed to launch GPU process. My script:
      #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Misc.au3> #NoTrayIcon $title = "Hello" $txt = "..." ; TODO: Make 4 of them ;~ #Region ### START Koda GUI section ### Form= ;~ $1_GUI = GUICreate($title, 370, 120, -1, -1) ;~ GUISetBkColor(0xFFFFFF) ;~ $1_B1 = GUICtrlCreateButton("B1", 136, 80, 107, 25) ;~ GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") ;~ $1_B2 = GUICtrlCreateButton("B2", 248, 80, 107, 25) ;~ GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") ;~ GUICtrlCreateLabel($txt, 16, 24, 338, 52) ;~ GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") ;~ GUICtrlSetColor(-1, 0x000000) ;~ GUISetState(@SW_SHOW) ;~ #EndRegion ### END Koda GUI section ### #Region ### START Koda GUI section ### Form= $2_GUI = GUICreate($title, 370, 0?"Hi :)":120, -1, -1) GUISetBkColor(0xFFFFFF) $2_B1 = GUICtrlCreateButton("B1", 136, 80, 107, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $2_B2 = GUICtrlCreateButton(0?":D":"B2", 248, 80, 107, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlCreateLabel($txt, 16, 24, 338, 52) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $u32dll = DllOpen("user32.dll") ;~ Opt("GUIOnEventMode", 1) ;~ GUICtrlSetOnEvent(-3, "_Exit") ; TODO: Fix, doesn't work with 2 GUI at the same time ;~ GUICtrlSetOnEvent($B11, "_Exit") ;~ GUICtrlSetOnEvent($B21, "_Exit") ;~ GUICtrlSetOnEvent($B12, "_Exit") ;~ GUICtrlSetOnEvent($B22, "_Exit") ;~ $pos1 = WinGetPos($GUI1) ;~ $pos2 = WinGetPos($GUI1) While 1 ;~ $pos1 = WinGetPos($GUI1) ;~ $pos2 = WinGetPos($GUI1) ;~ $x = $pos1[0] - 370 ;~ $y = $pos1[1] ;~ WinMove($GUI2, "", $x, $y, $pos1[2], $pos1[3], 1) ; Press middle mouse button to close (it's gonna be a non malicious prank for my friend) If _IsPressed(4, $u32dll) Then Exit $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _Exit() ;~ Case $1_B1 ;~ _Exit() ;~ Case $1_B2 ;~ _Exit() Case $2_B1 _Exit() Case $2_B2 _Exit() EndSwitch WEnd Func _Exit() ; TODO: ... ;~ GUIDelete($1_GUI) GUIDelete($2_GUI) Exit EndFunc ;==>_Exit How to get rid of these errors?
    • Nareshm
      By Nareshm
      I create message box but i dont know how to add button action when i click it.

      Help for : Add script for Button : Left, Right, Right Finger
      example when i press Left finger button do Case $idNotepad
                      $iPID = WinActivate ( " :PS :: Version - 2.8.0.0  - [eFS Bill]")
                              ControlSend(" :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:btnReset]", "{esc}")
                              ControlClick ( " :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]")
                              ControlSend(" :DS  - eF:: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]", "^v")
                              ControlSend(" :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]", "{enter}")
      How to add like above ?
                    
                                                                sorry for my bad english
       
    • Altor
      By Altor
      Hi all:
      In Scite it is possible to expand and collapse  all  the #Region at time  with a shortcut ..?
      Now I use the + key to expand and collapse but I can only use this suggestion for a one # Region
      If I collapse all the regions one by one  in order to have the code more understandable when I re-open the script all the regions are expanded and I need to collapse all again one by one.
      Thank.s to all
      Altor