Url Access Scripting - Problem with download...

Hi Folks,

I have written a script which checks the version number of an application, then checks on a server wheter there is a new file - if yes, then it should download the new files! I am also checking wheter it is an PPC or an Intel maschine!

When entering the URL in Safari the download is working as expected! When running the script there is a failure message: Url Access Scripting has timed out…

Thanks for any hints and tipps!


--Prozessor checken - check the machine
set proc to system attribute "sysa" as string

-- aktuelle Version herauslesen - check the current version

tell application "Finder"
	set appname to (version of application "Web'n'walk Manager MacOS" as string)
end tell

-- Internet Connect um eine neuere Version zu checken - check wheter there is a newer version

-- 
set ftpUsername to "sl"
set ftpPassword to "090978"
set ftpDirectory to "ftp://localhost/tma/version/"
set ftpLoginInfo to {"-u " & ftpUsername & ":" & ftpPassword & " "} as string
set tmpCurlCommand to ("curl " & ftpLoginInfo & (quoted form of ftpDirectory))

set tmpCurlResults to do shell script tmpCurlCommand

display dialog appname
display dialog tmpCurlResults

if tmpCurlResults is greater than appname then
	
	if proc is 2 then
		
		display dialog "Auf dem Server ist eine neuere Version der Software vorhanden - Möchten Sie downloaden? " & return & return & "Das neue File wird als 'T-Mobile.dmg' auf Ihren Desktop gespeichert..." buttons {"Cancel", "Ja"} default button "Ja"
		set the requested_status to the button returned of the result
		set theLocation to (path to desktop) as text
		set theDownload to theLocation & "T-Mobile.dmg"
		set theLink to "http://localhost/tma/release/T-Mobile_Web'n'walkManager_PPC.dmg"
		tell application "URL Access Scripting"
			download theLink to file theDownload
		end tell
		
	else if proc is 10 then
		
		display dialog "Auf dem Server ist eine neuere Version der Software vorhanden - Möchten Sie downloaden?" & return & return & "Das neue File wird als 'T-Mobile.mpkg' auf Ihren Desktop gespeichert..." buttons {"Cancel", "Ja"} default button "Ja"
		set the requested_status to the button returned of the result
		set theLocation to (path to desktop) as text
		set theDownload to theLocation & "T-Mobile.dmg"
		set theLink to "http://localhost/tma/release/T-Mobile_Web'n'walkManager_Intel.dmg"
		tell application "URL Access Scripting"
			download theLink to file theDownload
		end tell
	end if
end if




Thanks for your tipps and hints…

Stefan