# Notify when clicked within a group?

## Recommended Posts

Hello once again!

What I have is:

A groupcontrol created by GuiCtrlCreateGroup and inside it I have a few icons from GuiCtrlCreateIcon.

What I want to do is when I click within the group or on the icons I'll get a notification, or a message retrieveable by GuiGetMsg().

Any suggestions?

Best regards,

zvvyt

##### Share on other sites

Solved it.

Just placed a label without any text in it inside that group.

## Create an account

Register a new account

• ### Similar Content

• By Zedna
#include <WinAPI.au3> $text = FileReadLastChars("C:\Program Files\AutoIt3\Include\Array.au3", 1024) MsgBox(0, 'FileReadLastChars',$text) Func FileReadLastChars($sFile,$nChars)     Local $nBytes$tBuffer = DLLStructCreate("char["&$nChars&"]")$hFile = _WinAPI_CreateFile($sFile, 2, 2) ; open for read _WinAPI_SetFilePointer($hFile, -1 * $nChars, 2) ; from end _WinAPI_ReadFile($hFile, DLLStructGetPtr($tBuffer),$nChars, $nBytes) _WinAPI_CloseHandle($hFile)     Return DLLStructGetData($tBuffer, 1) EndFunc ; included as standard UDF since AutoIt 3.2.13.6 version Func _WinAPI_SetFilePointer($hFile, $iPos,$iMethod = 0)     $aResult = DllCall( "kernel32.dll", "long", "SetFilePointer", "hwnd",$hFile, "long", $iPos, "long_ptr", 0, "long",$iMethod)     If @error Then Return SetError(1, 0, -1)     If $aResult[0] = -1 Then Return SetError(2, 0, -1) ;$INVALID_SET_FILE_POINTER = -1     Return $aResult[0] EndFunc ;==>_WinAPI_SetFilePointer Here is my topic about _WinAPI_SetFilePointer() EDIT: simpler version compatible with latest AutoIt$text = FileReadLastChars("C:\Program Files\AutoIt3\Include\Array.au3", 1024) MsgBox(0, 'FileReadLastChars', $text) Func FileReadLastChars($sFile , $nChars)$hFile = FileOpen($sFile, 0) ; open for read FileSetPos($hFile, -1 * $nChars, 2) ; from end$sRet = FileRead($hFile) FileClose($hFile) Return $sRet EndFunc • By Rskm Hi, recently i created a GUI for some calculations in AutoIT. The GUI has 2 tabs and on the first tab, it has few inputboxes where i use to click with mouse and start entering the inputs. i recently made some changes in the position of these textboxes. I made this by changing the autoit code file instead of making changes in KODA. Now i cannot click inside these textboxes with mouse. However, i can use TAB key to cycle through/enter input in these input boxes. what could have made the inputboxes not responding to mouseclicks. thanks • By dinotom Can files be read from the web or the cloud? I am trying to read this file but get the file open error. #include <FileConstants.au3> #include <MsgBoxConstants.au3> ;Assign the file path to a variable Local$sFilePath = "C:\Automation\test.txt" Local $sFilePathAzure ="https://batlgroupimages.blob.core.windows.net/files/test.txt" Local$nLineNumberToLookFor = 0 ;Open the file test.txt in append mode. ;If the folder C:\Automation does not exist, it will be created. Local $hFileOpen = FileOpen($sFilePathAzure, $FO_APPEND +$FO_CREATEPATH) ;Display a message box in case of any errors. If $hFileOpen = -1 Then MsgBox($MB_SYSTEMMODAL, "", "An error occurred while opening the file.") EndIf ;Set the file position to beginning for reading the data from the beginning of the file. FileSetPos($hFileOpen, 0,$FILE_BEGIN) ;Read the data from the file using the handle returned by FileOpen ;Local $sFileRead = FileRead($hFileOpen) ;Read the 2nd line of data from the file using the handle returned by FileOpen Local $sFileReadLine = FileReadLine ($hFileOpen,2) ;Close the handle returned by FileOpen. FileClose($hFileOpen) • Hi All, I am trying to login into our application using AutoIT. When I launch the application a splash screen appears and the login screen goes behind it. At this point the script pauses and I loose control of everything. I have literally tried everything for the past two days but nothing has worked yet. Any suggestions would be appreciated. RunWait("\\mchsv411.siplaceworld.net\splmshare\int00\conf\start_apps\windows\start_nx110.bat en portal_client int00 tc112", "", @SW_MAXIMIZE) AutoItSetOption("SendKeyDelay", 200) Local$hWnd = WinWaitActive("Teamcenter Login")
MouseClick("left", @DesktopWidth / 2, @DesktopHeight / 2)
The splash screen has title "Teamcenter" and is static.
I tried to click on the center to get control of login window.
I have tried WinActivate, WinSetState, ControlCommand and a lot of other things.
• By lonardd
Hi,
I have a very strange problem concerning MouseClick function.
I need to start Control Panel, navigate it on the Display Section (Adjust screen resolution link), click on it, and from the next Dialog choose Intel Graphic tool tab and navigate into it when it opens.
I wasn't using MouseClick() at first when I tried to use Control IDs, but I was fed up with the Autoit Window Info poor and inaccurate info (It flickers and the moment I click on the control the control ID and class disappear) so I ended up choosing the easiest way.
The code I'm posting worked OK until two weeks ago, the mouse clicks were accurately performed and the Script reached the end with no errors...and I was happy.
All of a sudden, between one try and the other, I noticed the cursor not flying exactly where it was supposed to, namely to the Control Panel ->Display->Adjust screen resolution link   but it clicked some 30 pixels below and some 30 pixels to the left, choosing obviously and undesired function and from that point it screwed the whole thing up. And from that moment onward, it seems I can no longer regain the mouse to click on that sequence.
Could it be because my Control Panel ->Display form moved slightly from one test to another and therefore I got that small offside?
If you believe this is the reason, I should then re position the Control Panel ->Display window to 0,0 and recalculate all the clicks.
do you have a suggestion?

Thanks a lot
Dave

RotateDisplays.au3
×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...