Scripting Interarchy to mount FTP disks during boot
Scripting Interarchy to mount FTP disks during boot
- Subject: Scripting Interarchy to mount FTP disks during boot
- From: Doug McNutt <email@hidden>
- Date: Wed, 8 May 2002 17:32:12 -0600
My thanks to list members for a couple of sessions I needed while getting this to work.
The result:
-- The idea is to automate mounting of Interarchy's FTP disks at boot time
-- without a requirement to stand around and monitor the boot process.
-- The script should be saved as an APPL and placed in the startup items folder.
-- Released to the public domain:
-- Doug McNutt, email@hidden, 8 May 2002
--
-- First step is to unlock the keychain.
-- Interarchy refuses to provide any other way to save passwords for FTP disks.
tell application "Keychain Scripting"
unlock keychain "Keychain" with password "????????"
end tell
-- Keychain Scripting will go away before the unlock actually happens so . .
delay 5
-- That seems to be enough time for this G4 running 9.2
-- Asking Finder to wait until Keychain Access is not present works not.
-- Just putting Interarchy in the startup items folder won't work because
-- The system will run it before the keychain is unlocked.
-- So set Interarchy menus to turn off automatic mounting on startup
-- And let this script load the application.
tell application "Luna:Applications:Communication:Interarchy 5.0.1:Interarchy 5.0.1"
-- If you have a couple of old copies or boot from different disks
-- you need to use a full path here.
mountftpdisk name "Caelum"
mountftpdisk name "Incoming"
end tell
-- Interarchy leaves its FTP manager window open so we close it.
set wname to ""
repeat 30 times
try
-- The try block is necessary because the loop fails until the window opens.
tell application "Interarchy 5.0.1"
set wname to name of (frontwindowrecord)
-- the parentheses are required because frontwindowrecord is an
-- Interarchy command which returns a value rather than an object
-- which has a name.
-- "Name of front window" works with most apps but not Interarchy
end tell
end try
if wname is "FTP Disk Manager" then
tell application "Interarchy 5.0.1"
close
-- Not one of the FTP disks, just the window.
end tell
exit repeat
-- break out of the loop as soon as possible
-- It's not clear if we have to wait until the disks are fully mounted.
end if
delay 1
-- This delay might have to be changed for different internet speed.
end repeat
--
Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.