Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on getUrl()
- tell application "System Events"
- if ((application processes whose (name is equal to "Safari")) count) is greater than 0 then
- using terms from application "Safari"
- tell application "Safari"
- set link to URL of current tab of front window
- return link
- end tell
- end using terms from
- else
- return ""
- end if
- end tell
- end getUrl
- on getTitle()
- tell application "System Events"
- if ((application processes whose (name is equal to "Safari")) count) is greater than 0 then
- using terms from application "Safari"
- tell application "Safari"
- set title to name of current tab of front window
- return title
- end tell
- end using terms from
- else
- return ""
- end if
- end tell
- end getTitle
- using terms from application "Colloquy"
- on process user command cmd with args for whichPanel
- if cmd is equal to "www" then
- tell whichPanel
- send message (my getUrl())
- end tell
- else if cmd is equal to "www2" then
- tell whichPanel
- send message (my getTitle() & " - " & my getUrl())
- end tell
- end if
- end process user command
- end using terms from
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement