Jump to content

nick_r

New Member
  • Posts

    2
  • Joined

  • Last visited

nick_r's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. Thanks for the rapid response. I see that I am not able to attach workflow (presumably for security reasons?), but the it's quite simple: The first module is a "Keyword" without an argument. The second module is the bash script which takes its arguments from the clipboard. The final module is "Copy to Clipboard" module which uses plain text, has the content {var:id}, automatically pastes to the frontmost app, and makes the clipboard item transient. I've provided screenshoots of the overall workflow, and the final module. Is this information sufficient? It still seems to be the case that the line with the awk command is malfunctioning even though it works fine in the shell. I've noticed that you can change the scripting language, and I've changed it to zsh which is the scripting language for the terminal, but it still keeps making this error. I think perhaps the best approach would be to rewrite this in python, which probably has better string manipulation? (NB realise these are newbie questions - this is my first workflow) Thanks N
  2. Hi. I was wondering if anyone could help with the following bash script? It is supposed to do the following: You copy the URL of an outlook365 email. You call the workflow in Alfred It manipulates the copied URL and pastes this in your active app The link can now be clicked to take you to the email. NB sadly this only works when conversation view is turned off. I am having trouble capturing the output of the "awk" command. This is used to identify the ID of the email (the letters after the last forward slash). I've checked this on the command line, and it works fine. But it doesn't seem to work within Alfred. I think it might be to do with the use of "echo". That seemed to be the only way to capture the output of the "awk" command. The code is below, and you can try out the following URL "https://outlook.office.com/mail/inbox/id/AAMkAGYxY2E3NTk1LTE4MWEtNGM5OS05mZkLTMzZTA3YjE1ZWIzMQBGAAAAAACvq4d8nTSiTKyFrc7qQPbCBwCPfjnaKUWETJ10gdKjawcfAF5453XCAADypvc4SG%2BZQpfh%2FKsqPMSCAUqTI5OAAA%3D" (NB it won't actually take you to the email because you need to be logged on as me!) Any pointers welcome! # Get last item in clipboard query="{clipboard:0}" # Extract email id id=$(echo $query | awk -F "\/" '{print $NF}' ) # Create URL string1="https://outlook.office.com/owa/?ItemID=" string2="&viewmodel=ReadMessageItem&path=&exvsurl=1" url="$string1$id$string2" # paste echo -n $url
×
×
  • Create New...