Getting Fetch to make new connection

I’ve searched the forum for a solution to my issue but came up with nothing. My overall intent is to script Fetch to upload the newest file in a particular folder - once each day. I know how to schedule the script to run in iCal & probably can figure out most of the other workings…However I can’t even get to those stages because I can’t get Fetch to fully log-in to a server without intervention.

When I run the “record” mode of Applescript then walk Fetch down the path I need - the proper script seems to be input into the Script Editor. But when I run the script it launches Fetch and the “New Connection” window has all the info for the “Default Shortcut” - nothing is passed through from the script.

So my script looks like this:

tell application "Fetch 4.0.3"
	activate
	make new transfer window at beginning with properties {hostname:"ftp.fakehostname.com", userid:"fakeID", password:"password"}
end tell

and the “Default Shortcut” right now is ftp.fetchsoftworks.com, so when I run my script the “New Connection” window is populated by this shortcut info - nothing from my script.

So I can get around some of this by setting up a New Shortcut with all the appropriate info. Then i can set this “Shortcut” to be the default shortcut. So now when I run the script it launches Fetch and the “New Connection” window is populated with all of my info - great. Except it now waiting for me to click “OK”. I need to circumvent this so this it acutally connects without input from someone.

Too, I’ve found that if I do go ahead and click OK then Fetch opens two connections to my site. One for the default and one that I suppose is coming from the script itself. Because if I change the defualt shortcut and click OK - then it still opens 2 connections: one to the default, one from my script. I need ONE connection. And I need it to connect without additional input

Any ideas on this would be greatly appreciated. Ironically it seems like I had this same issue a few years ago. I seem to remember conquering it but if so, I don’t remember how. I’m using Fetch 4.0.3. Thanks

Got it. In Fetch Preferences needed to uncheck the “Show New Connection dialog at startup”.
Knew it was something simple that I was overlooking. Oh well…figured it out.