I just tested it and it works perfectly without those. Can you share your code please? Could you possibly have added spaces to the end of the "If" line and turned off the trailing spaces warning? That's the only way I seem able to make it work with curly braces and fail without them.
That sample will wait for 10 seconds until the pixel at 652,355 changes to 16777215. So you won't see it "do anything" for 10 seconds. Either way, after 10 seconds if you haven't changed any of the values in line 1 you should see "Pixel was not found".
If you look to the right of the button bar in your editor you'll see your mouse coordinates there. Click on the dropdown there and enable "Pixel Color" and "Follow Cursor". Now you'll see X,Y, and the Pixel Color as you move your mouse. If you move your mouse, you'll see those values change accordingly. Now pressing your left and right mouse buttons together, but you should see "Copied" for a fraction of a second. This will copy the values to your clipboard and will help ensure you have the correct values.
This video demonstrates my explanation.