extracted the Applescript to an external library that gets called via osascript trigger rather than via Alfred's Applescript action