You can use 'it' to identify the reference to the pasted control.
Here is some example code:
Code: Select all
on mouseUp
copy button "marko"
paste
set the name of it to "polo"
end mouseUp
Code: Select all
on mouseUp
copy button "marko"
paste
set the name of it to "polo"
end mouseUp
It was dark mode before dark mode became a thing. We were ahead of our time.