Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel Rodenburg
committed
Oct 31, 2010
1 parent
35629bc
commit b2b6107
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
set errorcount to 0 | ||
try | ||
tell application "Finder" | ||
if exists "FreeAgent" then | ||
eject "FreeAgent" | ||
end if | ||
end tell | ||
on error | ||
set errorcount to (errorcount + 1) | ||
end try | ||
|
||
try | ||
tell application "Finder" | ||
if exists "MiniMax" then | ||
eject "MiniMax" | ||
end if | ||
end tell | ||
on error | ||
set errorcount to (errorcount + 1) | ||
end try | ||
|
||
if errorcount is greater than "0" then | ||
if errorcount is equal to 1 then | ||
display dialog ¬ | ||
"Error: 1 Volume was not ejected" buttons {"OK"} ¬ | ||
default button 1 with icon caution giving up after 10 | ||
else | ||
display dialog ¬ | ||
"Error: " & errorcount & ¬ | ||
" Volumes were not ejected" buttons {"OK"} ¬ | ||
default button 1 with icon caution giving up after 10 | ||
end if | ||
end if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
set v to "afp://192.168.0.2/Hard Drive 2" | ||
--set v to "afp://host-name.local/Hard Drive 2" | ||
tell application "Finder" | ||
mount volume v ¬ | ||
as user name ¬ | ||
"daniel" with password ¬ | ||
"diddlmaus" | ||
end tell |