Rounding mouse click location

We can’t debug your code without seeing the indenting. Please do as the post above shows.

The error message tells you that you are trying to ask a string object (i.e. the string of letters 'distractor1') if it has has a mouse pointer in it, and that can never be true, since strings only exist in memory, not on your screen

I’m guessing that you have some sort of stimulus component named distractor1. Use that name directly: don’t surround it in quotes, which just makes it a series of letters.

I pointed you to some code that solved someone else’s similar problem. No doubt it needs to be adapted to suit what you require.