The short answer is that it’s (for now) impossible to do this. You can either let the user choose a location or use one of the pre-defined ones (e.g., getDataFolder()). For more details, please see (and maybe vote for) the feature request that’s already open regarding this topic at Get File-Entry without forcing the user to select it via File-Dialog.
ill just have the user pick a folder first and then continue my automation from there… it should work for now. but i definitely hope that it gets implemented in the future. I had done some scripting in Adobe PhotoShop and i was able to pick a location with no issues… Adobe XD is promising. I believe it should have this capability
Adobe has confirmed that persistent file references are coming–already in PS UXP. So the user will have to pick a folder once, but then you can store that reference somewhere.