"DropletScript" = "on open names

		tell application \"System Events\"
			set myProcesses to every process whose name is \"Transmit\"
			set wasRunning to (number of myProcesses is greater than 0)
		end tell

		tell application \"Transmit\"
			
			###server-password-creation###

			with timeout of 7200 seconds
			
				if ( wasRunning ) then
					
					if number of documents is equal to 0 then
						set dropDocument to make new document
					else
						set dropDocument to make new document at before front document
					end if
				else
                    repeat while ( number of documents is equal to 0 )
                        delay .5
                    end repeat
                    
                    set dropDocument to front document
				
                end if

				tell current tab of dropDocument
				
					if ( ###connect-to-server-info### )
						try
							tell remote browser
						
								repeat with the_item in names
									upload item at path the_item
								end repeat
							
								close
							
							end tell
						end try
						
					end if
				
				end tell
				
				if ( wasRunning ) then
					close dropDocument
				else
					quit
				end if
			
			end timeout

		end tell

end open

on run
	
	tell application \"System Events\"
			set myProcesses to every process whose name is \"Transmit\"
			set wasRunning to (number of myProcesses is greater than 0)
	end tell

	tell application \"Transmit\"
			
			activate 
			
			###server-password-creation###

			with timeout of 7200 seconds
			
				if ( wasRunning ) then
					
					if number of documents is equal to 0 then
						set dropDocument to make new document
					else
						set dropDocument to make new document at before front document
					end if
				else
					set dropDocument to front document
				end if

				tell current tab of dropDocument
				
					###connect-to-server-info###
				
				end tell

			end timeout

	end tell

end run";

"PasswordFinalization" = "set myPassword to (\"%@\" as Unicode text)\n";
"PromptSource" = "set reply to display dialog \"Enter password for %@:\" default answer \"\" buttons {\"Cancel\", \"Connect\"} default button \"Connect\" with title \"Enter Password\" with hidden answer\nset myPassword to text returned of reply\n";