Please help with this

This isn’t a working script but I hope someone can kindly fix it for me.
Certainly some lines don’t exist at all although certain Apps use Applescript but their dictonary is a mistry to me

After this “non working Script” you will find additional explanation about my process

I am using Snow Leopard because of the lack of Rosetta in the various Lions (due to the indifference form Apple computers to renew the Rosetta licence held by PowerPC IBM [mysteries of computer companies deals]


set theDoc to choose file with prompt "Select:"
tell application "TextWrangler"
	set theDoc to document 1
	set parag to (count of paragraphs of text of theDoc)
	repeat with i from 1 to parag
		set Para to parag - 1
			select paragraph Para of theDoc
			if Para contains :"Myserverita"
			tell application "transmit"
			activate 
			connect to favirite "Myserverita"
			end tell
			exit script
if Para contains :"MyserverOther"
			tell application "Safari"
			activate 
end tell
exit script
			else if
			Content Para contains :"MyserverFrance"
			tell application "speedownload"
			activate 
			end tell
			exit script
			else if
			Content Para contains :"MyserverGermany"
			tell application "Rapidshare Manager"
			activate 
			end tell
			exit script
			

end tell

Why I need this?

I need to upload download various large files often over 100 GB of space (mainly tentive film editing) and receive changes on the files.
All this happens either through ftp as we all have servers or most frequetly using the filesharing services such as rapidshare and so on, or news servers

Each deries of files consists in Rar segments and PAR2 files to fix possible transmission errors. Each file is password protected as only my coworker world wide can load them.

The files are so very large because they are “raw” files, and often include FinalCUtPro additional data in video and sound.

Some of these apps are in Java and they do not have Applescript support at all, however I hope the Finder will still be able to activate them

Once opened the various apps willl be opened I will manally perform what is necessary to either upload or download the various files.

I’am aware of professional applications “srot of” doing this already: however they do not suit my needs. Any confrntation on this matter is beyond my request which I hope will not bother anybody. In my country Internet is very slow and I have no choice.
Because of this I need to use 2 or 3 mqachines and two or 3 different Interent lines else my router becomes an electric turtle and really I can only barely use internet

As I might be not too clear please let me know and I will organize this request again …

Thanks a lot

Dan

For openers, Dan, two things.

  1. “Please help with this” doesn’t tell anyone what your problem is. Make titles meaningful.

  2. Leave out all the “exit script” commands. There is no such command so it won’t compile. The only procedure you can exit is a repeat loop. If you want to get out from inside the script (which will terminate by itself when it reaches the end otherwise) the command “return” with no argument does it.

Something like this should work. May need a little editing.



set theDoc to choose file with prompt "Select:"

-- Just pull the document in rather than mess with TextWrangler
set docparagraphs to paragraphs of (do shell script "cat " & quoted form of POSIX path of theDoc)

repeat with para in docparagraphs
	if para contains "Myserverita" then
		tell application "Transmit"
			activate
		connect to favorite "Myserverita"
		end tell
	else if para contains "MyserverOther" then
		tell application "Safari" to activate
	else if para contains "MyserverFrance" then
		tell application "speedownload" to activate
	else if para contains "MyserverGermany" then
		tell application "Rapidshare Manager" to activate
	end if
end repeat