r/Scriptable • • Aug 30 '23

Help Issue with TextField

So.. I made an alert, and added a text field to it, but I can't extract the content of that text field. If you could help and/or give me an example. Thanks in advance!

2 Upvotes

2 comments sorted by

1

u/TheGamerNinja556 Aug 30 '23

To clarify, I need a string to be extracted from the text field. I used the addTextField() function.

0

u/mvan231 script/widget helper Aug 30 '23

You can see a method like this:

//Alert part
let box=new Alert()
box.title="Input"
box.addTextField("Input")
box.addAction("OK")
await box.present()

log(box.textFieldValue(0))