Skip to content

Instantly share code, notes, and snippets.

@atr000
Created December 17, 2010 14:49
Show Gist options
  • Select an option

  • Save atr000/745049 to your computer and use it in GitHub Desktop.

Select an option

Save atr000/745049 to your computer and use it in GitHub Desktop.

Revisions

  1. atr000 created this gist Dec 17, 2010.
    22 changes: 22 additions & 0 deletions getCaminoURL.scpt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    -- GetCaminoURL.applescript


    -- Created by Thomas Willson on 8/7/09.
    -- Copyright 2009 __MyCompanyName__. All rights reserved.
    try
    tell application "System Events"
    set isRunning to ((application processes whose (name is equal to "Camino")) count)
    end tell
    if isRunning is greater than 0 then
    tell application "Camino"
    tell browser window 1
    set myURL to URL of current tab
    end tell
    end tell
    else
    set myURL to "Error"
    end if
    on error
    set myURL to "Error"
    end try
    return myURL as string