The argument of onMapSingleClick must be a code string. The code within the string is executed everytime the player clicks the map. Within the code string, the variables _pos, _alt, _shift, _units are reserved and represent the click position, the status of the ALT and SHIFT buttons (true or false), and an array of the selected units, respecively. E.g.:
onMapSingleClick {[_pos, _shift, _alt, _units] exec "detectClick.sqs"}
This simply calls the script "detectClick.sqs" upon map click, and all the relevant paramters are passed as arguments into the script, e.g. _pos = _this select 0.