I’m trying to read file content, and put it in the text area so I can update it, then write the update content back to the file if ‘save’ button clicked.
please see the screen below:
1, the first time, the file content is empty, if I input ‘the first time’ and click save. and it writes update content into the file.
2, but if I change content again, like input ‘Second time’, then click ‘savf’, the text in text area will show ‘the first time’ which is previous value.
Hi @calvin , it looks like what is happening is that if you are not doing a command + enter (on mac at least, im not sure how that translates to windows since it looks like ure using a windows machine), then the text does not save. As a result, the script will rerun and the text will not be written to the file.
Just to summarize, this is expected. The solution would be to make sure you’re doing a command + enter and then clicking save.
I’m not sure about a workaround but you can maybe try asking the community for a creative solution!
Sorry for the late reply; I was in yosemite and didn’t have signal!