You realise you can quite easily solve your first problem by doing
if mousedown(1) then
do stuff
repeat
until mousedown(1)=false
endif
so you have to release the button before any code will continue
if mousedown(1) then
do stuff
repeat
until mousedown(1)=false
endif
so you have to release the button before any code will continue