Oooh that subject was hard to think of.
I have a script that asks a user for (amongst other things) an ip address and a disk name. I would then like to mount the disk with the command
mount volume "afp://ip_address/disk_name" as user name user_name and password passwd
but this doesn’t work. Any ideas where I’m going wrong?
This works for me.
--it would be annoying to have to fill out 4 dialogs, but for the sake of
--being thorough in my post, I am including user name and password
set ip_address to the text returned of (display dialog "IP Address?" default answer "" with icon 1)
set disk_name to the text returned of (display dialog "Disk Name?" default answer "" with icon 1)
set user_name to text returned of (display dialog "User Name?" default answer "" with icon 1)
set passwd to text returned of (display dialog "Password?" default answer "" with icon 1)
mount volume ("afp://" & ip_address & "/" & disk_name as string) as user name user_name with password passwd
on error err
display dialog err
I found the answer by browsing these forums.
munt volume "afp://" & ip_address & "/" & disk_name as user name user_name with password passwd
I promise to look thoroughly before posting any more n00b questions.
Is there any way to get all that info without having to go through 4 dialogs?
My original plan was for the user to only have to go through the 4 dialogs on the first run of the program and then store the answers in 4 text files…unfortunately I have no idea (yet) how to write variables to a text file.