Beginner question: folder location in parameter.
Hello,
I'm trying to point to a folder to relink an image into and cant seem to get the syntax right.
I wrote a function. And when I call it I get an error that talks about Google Docs. Which is really weird because I'm selecting a folder on my desktop, and I don't have the google docs app installed - I access it through a web browser.
var firstLink = app.activeDocument.links[0];
relink (firstLink);
function relink (link){
var myTargetFolder = Folder.selectDialog("Select a folder.");
link.relink (to = File(myTargetFolder));
};

I also tried to just plug in the file path, and that throws another different error.
function relink (link){
link.relink (to = File("/Users/username/Desktop/package_v3"));
};
So my main questions are:
What is the correct syntax?
Does the syntax change if the argument is a variable vs a path?
why am I getting alerts about googledocs? how does it know my email? WTF?
Im new to JS, and this forum so let me know if I've done something else wrong.
Any help is appreciated! Thanks.
