Connect to a network computer

Hi guys!!

Could someone please tell me how to write an automated action that connects to a computer on the same network!!
Thx a lot!!

Ciao!!:slight_smile:

tony

Tony,

This is a script I use. Not fancy or anything but should give you some ideas.

set diskList to list disks
set mountedVols to {} as list
set volList to {"hardDrive1", "hardDrive2", "hardDrive3", "hardDrive4"}
set cnt to count diskList

display dialog "Do you wish to mount or dismount volumes?" buttons {"Mount", "Dismount"} default button "Mount"
set butChoice to button returned of the result as text
if butChoice is "Mount" then
	if cnt is not 6 then -- the computer seems to count the Network as a separate hard drive
		repeat with i from 1 to 4
			if diskList does not contain item i of volList then
				set mountedVols to mountedVols & item i of volList
			end if
		end repeat
		tell application "Finder"
			choose from list mountedVols with prompt "Choose volume/s to mount."
			set choice to result as text
			if choice is "hardDrive1" then
				mount volume "afp://userName:password@155.155.155.155/hardDrive1"
			else if choice is "hardDrive2" then
				mount volume "afp://userName:password@155.155.155.155/hardDrive2"
			else if choice is "hardDrive3" then
				mount volume "userName:password@155.155.155.155/hardDrive3"
			else if choice is "hardDrive4" then
				mount volume "userName:password@155.155.155.155/hardDrive4"
			end if
		end tell
	else
		display dialog "All volumes are currently mounted."
	end if
else
	my dismountVol()
end if

on dismountVol()
	tell application "Finder"
		eject every disk
	end tell
end dismountVol

PreTech

or with out the checking its something like this

mount volume "smb://user:password@192.168.0.5/volumename"