Cannot edit action script

I place d a button on a card. cntrl-clicked to edit actions.
Added a on mouse action and then left the action window.
I then control-clicked to edit the buttons script.
As soon as I clicked in the script to write I got a dialog telling me:
“This object script was created by an action set, changing the script will cause the action
set to be removed.” with “NO” and “YES” buttons.
I clicked “NO” it went away, clicked in the script editor and it came back.
A loop I couldn’t get out of.
I clicked “YES” it went away and I could edit my script.
The action WASN’t removed!
The warning doesn’t make sense, and certainly shouldn’t go into a loop.

I think we may need to look at the wording of the dialog. What it’s trying to say is if you manually edit the script that was created by an action, the relationship between this bit of script and the actions editor will be broken. If you say no, you can return to the actions editor and continue to build upon this script via actions. If you click yes, the code you created will remain and you can edit the script manually but you will no longer be able to edit it via the actions editor.

There is also another dialog, if you have a bit of manually added script in the script editor on an object, then you try to add an action to that object. The dialog will tell you that if you proceed with adding an action the script you already have in the script editor will be removed.

We will take a look at the flow of both these in a bit more detail to make sure they are behaving correctly and look at the wording used in the dialog. It may be useful in the dialog to offer an edit manually or edit via actions editor option.

Yes your explanation made sense, better than dialog. Perhaps…
“It appears this script was created by the Action Editor. Editing the script will remove link to Action Editor.”
With buttons: “Cancel”, “Return to Action Editor”, “Edit the Script”