Mac OSX Leopard and server connections
zryip theSlug
zryip.theslug at gmail.com
Fri Feb 5 18:18:17 EST 2010
2010/2/6 zryip theSlug <zryip.theslug at gmail.com>:
> Hi Dan,
>
> To resolve your problem you could use a try statement like this:
>
> set myVolume to "/Volumes/George"
> try
> do shell script "ls " & myVolume
> -- check if the volume /Volumes/George exists. If the volume
> doesn't exists an error occurs
> set myVolume to myVolume
> on error
> set myVolume to myVolume & "-1"
> -- if the try statement failed then the volume must be /Volumes/George-1
> end try
>
> set myDocument to myVolume & "Textfile.txt"
>
>
I correct myself to remove an useless line :
set myVolume to "/Volumes/George"
try
do shell script "ls " & myVolume
-- check if the volume /Volumes/George exists. If the volume
doesn't exists an error occurs
-- set myVolume to myVolume -- useless here ;)
on error
set myVolume to myVolume & "-1"
-- if the try statement failed then the volume must be /Volumes/George-1
end try
set myDocument to myVolume & "Textfile.txt"
Regards,
--
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
More information about the use-livecode
mailing list