You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
386 B
12 lines
386 B
class templaterFunc {
|
|
createNewFile(tp) {
|
|
const fileName = this.getUserInput(tp, "File name")
|
|
const templateName = this.getUserInput(tp, "File name")
|
|
return tp.file.create_new(tp.file.find_tfile("Template ") + templateName, filename, true, tp.file.folder())
|
|
}
|
|
|
|
getUserInput(tp, promptScript) {
|
|
const tempresult = await tp.system.prompt(promptScript)
|
|
return tempresult
|
|
}
|
|
} |