Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Add file references to anyone's Address Book entry' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add file references to anyone's Address Book entry
Authored by: mesa on Feb 10, '06 08:59:37AM

The URL field seems the obvious place to add a file reference, unfortunately address book prepends a http:// if one isn't found which breaks a file:// URL. Maybe if someone from Apple reads this they can fix it.

/Michael

---
This space intentionally left non-blank



[ Reply to This | # ]
Add file references to anyone's Address Book entry
Authored by: mark hunte on Feb 10, '06 11:48:19AM
Heres a plugin I just made to work with the "file" label in "Related Name"
Place it in your Addressbook plugins folder.
/Library/Address Book Plug-Ins/

Restart Addressbook. Enter a file path in the file label field i.e
/Users/Username/documents/x.pdf

Now when you click the 'file' label the will be a option to 'Open file'
select and the file is opened.

I am working on a script to choose a file to add to the list. In fact I can do it already.
But it not exactly how I want it, so I need to play some more.

the first script:

 using terms from application "Address Book"
	on action property
		return "Related Name"
	end action property
	
	on action title for p with e
		if label of e is equal to "file" then
			return "Open File"
		end if
	end action title
	
	on should enable action for p with e
		return true
	end should enable action
	
	on perform action for p with e
		set thefile to the value of e
		tell application "Finder"
			
			do shell script "open " & quoted form of thefile
			
		end tell
	end perform action
	
end using terms from

---
mh

[ Reply to This | # ]

Add file references to anyone's Address Book entry
Authored by: mark hunte on Feb 11, '06 12:44:19PM
Someone wanted to open a file on their iDisk. so I adapted the script for that.
It uses system events , keystrokes to mount the iDisk...

the path to the file should be: /Volumes/loginnamefor.mac/filepath

 
using terms from application "Address Book"
	on action property
		return "Related Name"
	end action property
	
	on action title for p with e
		if label of e is equal to "file" then
			
			
			return "Open File"
		end if
	end action title
	
	on should enable action for p with e
		return true
	end should enable action
	
	on perform action for p with e
		set thefile to the value of e
		if thefile contains "idisk" then
			tell application "Finder"
				activate
			end tell
			tell application "System Events"
				keystroke "i" using {command down, shift down}
			end tell
			delay 5
			do shell script "open " & quoted form of thefile
		else
			tell application "Finder"
				
				do shell script "open " & quoted form of thefile
				
			end tell
		end if
	end perform action
	
end using terms from

---
mh

[ Reply to This | # ]