I get an NSInternalScriptError when I try to run the following code.
The code is supposed to upload a file or files that are dropped on the
script. Transmit is the program that should do the uploading.
I believe the line :
upload item some_items
is drawing the error. I think it has something to do with how the
path is created. I think the path that Transmit likes uses → ‘/’ as
delimiters and the variable is passing ‘:’ instead. I tried to change
but I’m not sure how.
code ===========
on open some_items – droplet handler
activate application “Transmit”
tell application “Transmit”
make new document at before front document
-- send commands to the frontmost document window
tell document 1
connect to "[url=ftp://ftp.mydomain.net]ftp.mydomain.net[/url]" as user "user" with password "pass"
with initial path “/public_html/” with connection type FTP using port
21
if (connect to "[url=ftp://ftp.timreynolds.net]ftp.timreynolds.net[/url]") then
try
-- Setting the path to a complete specified path
if (set their stuff to “invoice”) then
– Uploading the file
upload item some_items
end if
end try
else
display dialog ("An error occured, could not connect to ftp")
end if
end tell
end tell
end open