Yep changing the code to below without the messagebox worked fine using mc.mcCntlSetLastError(inst,Message) instead
local mcUserScript = {}
local inst = mc.mcGetInstance()
function mcUserScript.UserMessage(Message)
if (Message == nil) then --No message was passed
Message = "No message passed" --If no message is passed this will be the default message
end
--wx.wxMessageBox(Message)
mc.mcCntlSetLastError(inst,Message)
end
return mcUserScript -- Module End
with this now working it should give you something to play with ;-)
DazTheGas