It is possible that the window may use NSIS to function
Right mouse click?
Or you can create a popup menu?
How right click mouse function using NSIS?
3 posts
Just simulating a right-click is not useful because you don't know where the mouse is or what the mouse is over but since you provided zero information about what you are actually trying to do or why, all I can give you is what you asked for:
Section
!define MOUSEEVENTF_ABSOLUTE 0x8000
!define MOUSEEVENTF_RIGHTDOWN 0x0008
!define MOUSEEVENTF_RIGHTUP 0x0010
System::Call 'USER32::mouse_event(i ${MOUSEEVENTF_RIGHTDOWN},i 0, i 0, i 0, i 0)'
System::Call 'USER32::mouse_event(i ${MOUSEEVENTF_RIGHTUP},i 0, i 0, i 0, i 0)'
SectionEnd Maybe we have in mind the use of functions: CreatePopupMenu and AppendMenu ?