Applescript to open a project

06 March 2005 · 0 comments

I recently realised that if client X asks me to edit paragraph 3 on services.html I have to open my Client X folder on my computer, my Client X email folder, the Client X ftp address and so on, so I made an Applescript for each client and use Launchbar to open the script with [...]

 

I recently realised that if client X asks me to edit paragraph 3 on services.html I have to open my Client X folder on my computer, my Client X email folder, the Client X ftp address and so on, so I made an Applescript for each client and use Launchbar to open the script with a keyboard command.

In case the script might be of use, here’s one for ClientX. You’d need to change what should be fairly obvious bits for your own use.

I’m no Applescript expert so while this works for me and it might work for you, well, who knows? Watch out for line wraps.

-- Applescript to open Finder window, Interarchy ftp address
-- Eudora mailbox and Safari tab

-- Note: replace the username in the path, and figure out the
-- correct path for your folder
tell application "Finder"
    Open "Macintosh HD:Users:username:Documents:websites:www.clientx.co.nz"
end tell

-- Note: replace the host address in the path, and replace
-- the username and password
tell application "Interarchy"
    activate
    list file "Macintosh HD:private:tmp:501:Cleanup At Startup:Directory Listing" ¬
      host "clientx.co.nz" path "public_html/" user "name" ¬
      password "password" with window
end tell

-- Note: replace the mailbox name. On my machine this mailbox
-- is inside a folder, but that makes no difference - you just
-- call it by name
tell application "Eudora"
    open mailbox "clientx"
end tell

-- Note: replace the URL
tell application "Safari"
    if not (exists document 1) then
        make new document at the beginning of documents
    end if
    set the URL of the front document to "http://www.clientx.co.nz/index.html"
end tell

-- end Applescript
Clip to Evernote

Be the first to comment ⇒

Tell us what you think.
Note: there may be a delay before your comment appears. I now approve all comments from new visitors, in an attempt to keep spam at bay.

Add your Comment

Older Post:

Newer Post: