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

Similar Threads
thread Thread Starter Forum Replies Last Post
Upgrade AppleScript editor tcpms Mac Applications and Mac App Store 5 Apr 14, 2014 10:49 AM
Possible AppleScript question Telp Mac Basics and Help 2 Mar 28, 2014 10:04 PM
\n within regex gets replaced with new line by AppleScript Editor poobear Mac Programming 7 Jun 27, 2012 05:51 PM
iCal "Run Script" alert opens .scpt file in AppleScript Editor instead of running it drskot Mac Programming 3 Jun 7, 2012 12:47 PM

Forum Jump

All times are GMT -5. The time now is 03:09 AM.

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

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