I'm trying to find/modify a script that allows me to create a new file (docx, txt, xlsx, etc) quickly at the
location I'm currently working on (Like the app Easy New Files).
I found this script which does exactly what I was looking for:
Although it works, every time I run it, it required my authentication either with my password, touchID, or apple watch, which adds additional friction to the process. I'm curious if this is hardwired, or is there a way that I can disable it.
I just tried the same macro. It doesn't ask me for permissions. I'm guessing that this is a permissions issue for the folder you are trying to write to. Are you able to copy new files manually from a Terminal window into the same folder? Try that out. I have a hunch that may not work either, which means we know what the problem is. As for a solution, I'm not sure yet.
Try creating a file from the Terminal into that folder. If you get an error, you will narrow the problem even further. In that case, the problem occurs outside of your macro, and that will make it easier to understand or fix.
Then run your macro, and the Debugger will pop up just before you reach the statement that gives you the error. Then you can examine the statement that fails, including any variables that it's going to use in its execution. Once you collect that information, you can be certain that your test with Terminal will be a perfect equivalent to the action.
Do you know how to examine variables using the Debugger? There's a small X in the debugger window that you have to press, if you haven't already pressed it.