The relevant code is very straightforward:
Code: Select all
put the mouseColor into tSampledColor
set the backgroundColor of me to tSampledColor


k
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
put the mouseColor into tSampledColor
set the backgroundColor of me to tSampledColor
yes, we can see that from your first post.
Code: Select all
on idle
if the optionKey is down then
put the mouseColor into tSampledColor
set the backgroundColor of me to tSampledColor
Thanks Craig! I am indeed an old fart that started with HyperCard in the 80s, then SuperCard for a long time. I generally avoid using idle for anything significant and often consider changing the idleTicks to reduce the load when I do use it. I still think that the option/alt key feels more natural in this slightly unusual use case, but I've changed the method to rawKeyDown and the Return key. That seems fine in my brief tests, and I do appreciate the nudge towards better (more responsible?) coding.dunbarx wrote: ↑Thu Feb 06, 2025 6:49 pmAnother, likely better way is this. No message is sent when simply pressing the optionKey. But perhaps you could switch to, say, a function key. In that case a keyDown or rawKeyDown message would be sent, and a modified handler just like you already have would fire.