Hey guys,
Script newbie here and would appreciate any help.
The current script - which was previously used in Photoshop by someone else - imports a downloaded image (location) to the project panel.
function OpenDocument(location) { return app.open(new File(location)); }
Right now a selected image is downloaded via a panel (Pixabay image API). It downloads fine and then is immediately seen in the project panel, but either a new untitled project has been created automatically (if current project is saved), or I get the "Save changes to 'untitled project' before closing?" prompt.
Any ideas would be greatly appreciated. I'll be honest, I don't completely understand what the code is doing - just hunches. I simply want the downloaded image to appear in the project panel of current project - no questions asked.