Last active
August 29, 2015 14:05
-
-
Save chaseroden/6d7ff3eee7ad988068ae to your computer and use it in GitHub Desktop.
Copies Zendesk ID from Outlook 2011 email to clipboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set target_string to "\\" | |
tell application "Microsoft Outlook" | |
set selectedMessages to current messages | |
if selectedMessages is {} then | |
display dialog "Please select a message first and then run this script." with icon 1 | |
return | |
end if | |
repeat with theMessage in selectedMessages | |
-- get the information from the message, and store it in variables | |
set theName to subject of theMessage | |
set theCategory to category of theMessage | |
set theContent to content of theMessage | |
end repeat | |
-- display dialog theName | |
set findIDCommand to "echo -e" & quoted form of theName & " | grep -o -e \\\\[....\\-....\\\\]" | |
set the clipboard to (do shell script findIDCommand) | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment