LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
How would you expect the engine to predict whether the user is going for a single- or douible-click? You'll have to figure out some sort of shielding.
Here's a quick and dirty idea:
local sWasDoubleClicked
on mouseDown
put false into sWasDoubleClicked
put the doubleClickInterval + 10 into tInterval
send "singleMouseDown" to me in tInterval milliseconds
end mouseDown
on mouseDoubleDown
put true into sWasDoubleClicked
-- do your double down thing here
answer "Double!"
end mouseDoubleDown
on singleMouseDown
if sWasDoubleClicked then exit singleMouseDown
-- do your single down thing here
beep
end singleMouseDown
I tried for two hours yesterday to find a solution; the closest I came to it was to use mouseStillDown in tandem with mouseDoubleClick...your script does the job perfectly.