User Input
User Input
Receive text from a user by adding arg to your script:
arg will prompt the user to enter text, wait for the text, then return the value of the text to value and continue on with the script.
You can then use value as a string in your script however you want.
If you want to tell the user what information the prompt expects, provide a string:
If you want give the user options to select, provide an array as the second argument:
Drag and drop
Prompt the user to drag and drop a file by using the drop method:
Longer Text
Allow the user to input multiple lines of text using textarea:
Pre-load the textarea with text by passing a string:
Code Editor
(💵 In the future, using editor will require a paid update)
Launch a full code editor using editor. This is great
Pre-load the editor with text and specify a language for code highlighting/features:
Keyboard Shortcut
If you were to type cmd+j, keyData would give you the following response: