Jump to content

adayzdone

Member
  • Posts

    27
  • Joined

  • Last visited

Everything posted by adayzdone

  1. Thanks for the response Vero. This does not change the behavior for me. After I select the test workflow the window remains open. Please download the workflow I provided above and try for yourself.
  2. The behavior of the input window has changed during the last several updates. The workflow below used to close the Alfred window once the input was selected. Now it runs the script as expected but leaves the window open. How do I restore the original behavior? Here is a sample workflow as an example: https://dl.dropboxusercontent.com/u/2422542/Test.alfredworkflow Thanks.
  3. Thanks for the great workflow Carlos. Feature Request: Will you add file urls to files and mail messages so you can reference them rather than attaching them?
  4. I understand you can use a script filter to display 3 results and use the selected result to pass arguments to a script afterwards. Is it possible to use 3 seperate keywords to pass hard coded argument to a script directly? I am trying to avoid using two steps (keyword & resulting list) to select the workflow's parameters.
  5. Hi Shawn, Thanks for the reponse. How do you find which applications support a scheme, and if so, what it is? I am trying to create a custom action for Contacts that is triggered by the Notes field. However, rather than just sending the value of the Notes field, I want the First and Last names as well.... or at least a reference to the contact so I can parse it myself.
  6. Can someone point me to the documentation for "Pass to URL Scheme"? What values can you preface the query with? I am trying to pass both the value of the notes field along with the contact's First and Last names. Is this possible?
  7. I am confused. Starting with... <item uid="rdioartist" arg="r96664" valid="yes" autocomplete="Incubus"> Which is the recommended format to exclude uid ? <item uid="" arg="r96664" valid="yes" autocomplete="Incubus"> <item arg="r96664" valid="yes" autocomplete="Incubus"> When would you use <arg></arg> ?
  8. What happens when you do that now?
  9. I'm not sure I understand. Will you explain a bit more?
  10. Hi plucas62. Google changed the way the voice search was activated after I posted the workflow. I have posted a new version which should work as expected.
  11. I updated the link. Thanks for pointing that out.
  12. The Voice Search Workflow opens Google's search page in Chrome and activates the voice search. Upon a successful search, search terms are copied to the clipboard. Download Usage: Call the Voice Search workflow with the vs keyword. Version: 1.2 Release date: 2013-05-16 Author: John Day Version History: 1.2 Opens new tab if current tab is not Google Search 1.1 Copy Search Term to Clipboard 1.0 Initial Release Dependencies: Google Chrome must be installed.
  13. Hi Carlos, You can reduce this set wf to load script POSIX file (POSIX path of ((POSIX file ((POSIX path of (path to me)) & "/..") as text) & "q_workflow.scpt" as text) as text) to this... set wf to load script POSIX file (POSIX path of ((path to me as text) & "::") & "q_workflow.scpt")
  14. Try: try set query to "{query}" as number set base_em to 16 set calculated_em to query / base_em set the clipboard to calculated_em as text on error errMsg number errNum tell application "Finder" activate display alert errMsg & return & return & "Error number" & errNum buttons "Cancel" cancel button "Cancel" end tell end try
  15. I have posted an example of how to Generate Feedback in Alfred 2 Workflows . From the Script Filter you can call the AppleScript with: osascript xml.scpt "{query}" To accept the query in the AppleScript, use: on run argv set query to argv as text end run Note that argv is a list and may cause problems if you don't convert it to text first.
  16. The EXIF Data Workflow will display image dimensions and all of the other metadata as well.
  17. Thanks Tyler. I thought the addition might be a cool feature for the OP to incorporate in his first workflow. In AppleScript you can use: set newDate to (current date) + 1 * days
  18. Nice one. Feature request: Allow an optional +N or -N days. Today is Wednesday, April 24, 2013 date +3 = Wednesday, April 27, 2013
  19. Hi Andrew, Could the problem be caused by Alfred compiling the script? If you compile the script below in AppleScript without Safari running, it will launch upon compliation. tell application "Safari" set URL of document 1 to "http://www.alfredforum.com/" end tell
  20. Hi Alex, You can simplify your script. return date string of (current date)
  21. The EXIF Data Alfred Workflow uses Exiftool and mdls to quickly display metadata in Alfred. Version: 1.0 Release date: 2013-04-21 Author: John Day Original Release Page : http://www.johneday.com/831/exif-data-alfred-workflow Download Usage: Select a file and call the EXIF Data workflow with the et keyword. Map the four Hotkeys to bypass the main menu and execute options directly. Select an item from the View in Alfred option to copy the tag’s information to the clipboard. Select one or multiple items from the Choose from list option to copy the tag and its information to the clipboard. Select the Export to file option to save metadata to a text file in ~/Documents/metadata/ using ExifTool. One or multiple files may be processed with this option. If the selection is not a supported file type, you are given the option to use mdls to view available information. Select the Export mdls to file option to save metadata to a text file in ~/Documents/metadata/ using mdls. One or multiple files may be processed with this option. System Modifications: A metadata folder is created in Documents to archive the text files created by the Export to file and Export mdls to file commands.
  22. This workflow demonstrates several feedback scenarios and can be used as a template for your AppleScript projects. I will maintain an updated copy of this post on my blog: http://www.johneday.com/617/generate-feedback-in-alfred-2-workflows Overview: To generate feedback in Alfred, we use a Script Filter to pass a query to the xml.scpt AppleScript. The script then processes the query and returns a properly formatted XML string containing information for each item to be displayed. After you import the Generate Feedback workflow, launch it with the gf keyword to view my five examples. To reveal the xml.scpt you will need to edit, open the gf Script Filter and click the Open workflow folder button at the bottom of the window. Basic Usage: Add each item you would like to be displayed in your workflow to the itemList by passing a record containing the required labels to the xmlItem handler. For an in-depth description of each attribute, I have included pieces of David’s tutorial in the script’s comments. on run argv -- coerce the argv list to text set query to argv as text -- create an empty list to hold the items set itemList to {} -- Feedback item 1 set end of itemList to xmlItem({uid:"My uid", arg:"My arg", title:"My Title"}) -- Wrap the elements of the list with a declaration and return the list to Alfred return giveFeedback(itemList) end run xmlItem Handler Required labels: {uid:"My uid", arg:"My arg", title:"My Title"} Optional labels: subtitle:"My Subtitle" valid:"no" autocomplete:"Autocompleted text" icon:"icon.png" icon:"public.plain-text", iconAttribute:"filetype" -- iconAttribute must be used with icon icon:"/Applications", iconAttribute:"fileicon" -- iconAttribute must be used with icon Advanced Usage: Characters < > & " need to be escaped properly for XML. To insert items that may contain these characters, pass the string to the clean handler along with a true/false value to remove leading and trailing whitespace. clean(" Title with leading whitesplace & < > \" characters, trimming true", true) Alfred uses the uid attribute to learn which results are selected the most and then uses this information to sort your feedback. If you would like to manually arrange the returned items, use the uuid handler to generate a unique uid. In Alfred’s next release (after 2.0.2), this issue will be resolved and the item UID attribute will be optional. uid:uuid() Along with the workflow, I have included a list of file types that may be used as values for the icon label when paired with iconAttribute:”filetype”. See http://imgur.com/a/0zXVX for the corresponding icons.
  23. If anyone is interested, I have posted an AppleScript handler you can use as a template to generate feedback. http://www.johneday.com/617/generate-feedback-in-alfred-2-workflows
  24. Cool Script. Here is a script I wrote that uses ExifTool to access the metadata... ExitTool Service
×
×
  • Create New...