Working with JS and Morphs (Getting current text from onscreen)

I cant do the console:

Try removing the spaces

ctrl shift i

UGH I CANT I said already I cant do inspect element.

school account?

No.

my code rn:
image

Remove the spaces

"missing ) after argument list"

image

fdsgcsfcxx i missed one of the spaces

it went back to the original "invalid left side" error

idk. gonna copy it to the console

world.children[0].stage.children.find(e => e instanceof StagePrompterMorph).inputField.contents().text.text = 'hello world' works from console

dshucxiysuhifdvh just went and renamed the thread like 10 times but now i've settled on a basic topic idea

that's because your pervious script didn't work. You fixed the problems.

This script works, but doesn't resize the textbox after the text is changed, so the new text gets cut off.

you also have to click out of and back into the textbox before the cursor will recognize the new text. otherwise it thinks the old text is still there and will change it back if you try to edit it

Oops. Try this instead:

var contents = (this.talkBubble()?.contents)||"";
if (contents instanceof TextMorph){
return contents.text} else {return contents};

Ah. So sorry. I'll delete them.