Firehed's Blog

Amazon Link Applescript Update

Just found out that there's one more kind of annoyingly long Amazon link, and my previously-posted Applescript to create short affiliate links needed an update.  Here's the excerpt - if you're using Applescript, you should be able to figure out where it goes.

	else if link contains "/detail/-/" then
-- http://www.amazon.com/exec/obidos/tg/detail/-/B00009R6UA/ref=pd_luc_mri?_encoding=UTF8&m=ATVPDKIKX0DER&v=glance
set startLength to the offset of "/detail/-/" in link
set startLength to startLength + 10
set endCutoff to startLength + 9
set asin to the text startLength thru endCutoff of link as text