一个想法(an idea)

 From:  Michael Gibson
12027.5 In reply to 12027.4 
Hi SUIYAN,

re:
> Yesterday, I kept trying to use AI (the free version of Doubao) to write functional scripts
> for these two pieces of code, but the scripts were invalid.

Yes I've heard from others that tried to make MOI scripts using AI and it tends to generate just non-functional garbage code. I suspect there is not enough training data available for it to work very well.

For the first one showing how to set the title property you could put that code into a .js file, then (using MOI v4 or higher) put that .js file into the Moi appdata startup folder. When MOI is launched any .js files in that folder are loaded and run.

Another way to run it which should work in V3 is to add script: to the start of it and do a Ctrl+C to copy it to the clipboard. Then inside MoI type the Tab key to put keyboard focus into the XYZ input control, then Ctrl+V and Enter will run that code, setting the title="" attribute on every <moi:CommandButton> in the currently loaded UI.

- Michael