Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Applications > Mac Applications and Mac App Store

Reply
 
Thread Tools Search this Thread Display Modes
Old May 5, 2012, 08:59 PM   #1
Jack9034
macrumors member
 
Join Date: Dec 2011
AppleScript Editor Question

Here is my script:

set a to display dialog "What server would you like to connect to?" default answer "Student Server Disks" with title "Connect to Server"
if text returned of a is "Student Server Disks" then
try
mount volume "afp://Student:student@server.schoolname.school.nz/"
end try
end if
if text returned of a is "Burt" then
try
mount volume "smb://Burt/Owner/"
end try
end if
if text returned of a is "Burts Laptop" then
try
mount volume "smb://burt-pc/burt/"
end try
end if
if text returned of a is "gurtrudes Laptop" then
try
mount volume "smb://gurtrude-pc/Gurtrude/"
end try
end if

How do I get an error message if the text in the display dialog is not valid. (eg. say i entered windowslaptop in the display dialog. Can I get an error message saying something like: Cannot connect to the server "windowslaptop") I want it to say Cannot connect to the server "whatever i entered in the display dialog".

Could someone please give me a script for that. Sorry I'm new to scripts and things...

THANKS!! :-)
__________________
15" Retina MacBook Pro, 2.3GHz, 8GB RAM, 256GB SSD
Jack9034 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Applications > Mac Applications and Mac App Store

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:25 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC