You can do this from db loading user32.dll
Heres an example:
set window on
set display mode 400,200,32
load dll "user32.dll",1
rem Position mouse at the "Maximize" button
call dll 1,"SetCursorPos",366,10
suspend for key
rem Click the left button
call dll 1,"mouse_event",2,0,0,0,0 `Mouse down
call dll 1,"mouse_event",4,0,0,0,0 `Mouse up
suspend for key
This link from msdn describe the mouse_event function.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/mouseinput/mouseinputreference/mouseinputfunctions/mouse_event.asp