|
|
#1 |
|
Junior Member
Join Date: Jul 2005
Posts: 2
|
SendMessage to click button of other application
I am quite new to NSIS and not so familiar with windows messages. I like to use NSIS as a wrappper for another installation application to automize some steps. So I like to let the NSIS installer click some buttons in the other windows. From searching the forum I got the idea to use SendMessage for that. But I have no idea which message to use. There are quite a few messages in the winMessages.nsh like WM_MBUTTONDOWN or WM_NCLBUTTONDOWN which look like they could work. Has anyone some experience with that?
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2005
Posts: 2
|
Thanks for the link. Now I have another question: I adapted the code to my needs (see below) and started testing it a little bit but I cannot get the GetWindowModuleFileName function work properly. I might not need this function in this special case but I like to know how to work with it.
Although $0 gives me the window handle to my password (Kennwort) window $2 just gives me name and path of the runnning NSIS installer. I cannot see what I did wrong but I certainly did. Code: Section "" StrCpy $3 0 wait: IntOp $3 $3 + 1 StrCmp $3 500 error Sleep 100 FindWindow $0 "om-popup" "Kennwort" StrCmp $0 0 wait strcpy $2 "test" MessageBox MB_OK "Handle: $0" MessageBox MB_OK "vor GetWin ... : $2" System::Call 'user32::GetWindowModuleFileName(i r0, t .r2, i ${NSIS_MAX_STRLEN})' MessageBox MB_OK "nach GetW...: $2" ${GetFileName} '$2' $2 MessageBox MB_OK "Datei :$2" goto Erfolg error: MessageBox MB_OK "nicht gefunden" quit Erfolg: SectionEnd |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|