• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Server login
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Server login


  • Subject: Re: Server login
  • From: Jay Louvion <email@hidden>
  • Date: Thu, 12 Jan 2006 01:42:39 +0100

Title: Re: Server login



On 10/1/06 22:45, "Michael Curtis" <email@hidden> wrote:

> Hi,
>
> I want to write an Applescript that will login into an umounted  
> server, copy some files and then eject the server. I don't want the  
> users to be able to see any of the login. Is this possible in  
> Applescript?
>
> Best wishes
>

Try to adapt this piece I wrote to copy a file/folder to the desktop of a certain server. It handles the possibility of a duplicate in the target location (the -15267 bit), with choice dialog. Just adapt the properties below and save the script as an application (run-only). It works as a drag and drop on the application or as an app that you run (in one case it mounts, copies and unmounts; in the other it just mounts and opens the desktop folder).

HTH

J.

property usr : "user_name"
property psswd : "password"
property ipaddr : "192.168.x.x"
property vol : "home_folder_name"

--the drag and drop bit
on open some_items
   mount_volume(usr, psswd, ipaddr, vol)
    tell application "Finder"
        activate
       try
           duplicate some_items to folder "Desktop" of disk vol
       on error mistake number num
           if num is -15267 then
               set choice to (display dialog mistake & return)
                if number of button returned of choice is 2 then
                   duplicate some_items to folder "Desktop" of disk vol with replacing
               else
                   eject disk vol
               end if
           else
               display dialog mistake & return & num
           end if
       end try
       eject disk vol
   end tell
end
open

--the double-click to run bit
on run
   mount_volume(usr, psswd, ipaddr, vol)
    tell application "Finder"
        activate
       open folder "Desktop" of disk vol
   end tell
end
run
on
mount_volume(usr, psswd, ipaddr, vol)
    mount volume "afp://" & usr & ":" & psswd & "@" & ipaddr & "/" & vol
end mount_volume


Jay Louvion
Studio Casagrande
3, rue Müller-Brun
1208 Geneva

T+4122 840 3272
F+4122 840 3271

skypeme:
jaylouvion

www.studiocasagrande.com


P Please consider the environment before printing this email.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Server login (From: Michael Curtis <email@hidden>)

  • Prev by Date: Re: similar strings
  • Next by Date: Re: desktop picture
  • Previous by thread: Server login
  • Next by thread: Various Qs about Intel and AppleScript
  • Index(es):
    • Date
    • Thread