AppleScript editor to connect and disconnect again to specific server I's trying to write an AppleScript to disconnect and connect again to specific server:

    tell application "Finder"
        mount volume "smb://serveraddress/sharename" as user name "username" with password "password"
    end tell


But it is connecting only. I'm trying to do both: to disconnect and then to connect again.
I finaly figered out how to do that so i write this code and it works

tell application "Finder"
    try
        eject alias "Volume name"
    end try
    mount volume "afp://Server/volume"
        open alias "Volume name"
end tell


I hope it will be helpful.