Jump to content

rahuja

Member
  • Posts

    4
  • Joined

  • Last visited

Everything posted by rahuja

  1. You can create a custom Web Search in Alfred Preferences with onepassword://search/{query} as the Search URL (http://bit.ly/2XK09ON). If your search string is unique enough, it'll open 1Password.app with the highlighted record. This works well, but even better would be a workflow that populates a filtered dropdown list of matching items. I'm not sure if this is available (if not, perhaps one can be hacked together using https://support.1password.com/command-line/ or another API?).
  2. Good call - uploaded here. The bottom Run NSAppleScript includes the hardcoded folder that I'm trying to pass in as an argument to the parameterized version of the script. Essentially, I just want one Run NSAppleScript (or Run Script) action with different keyword inputs corresponding to various parameter values for q in that alfred_script(q). Let me know if I should provide any additional clarification.
  3. Hi, Thanks for the reply. I read your [HOW TO] Workflow/environment variables, but am still unsure of how to pass workflow variables to the {query} or argv input of a Run Script action. I know I can access them directly within the script with {var:varname}, but I want to use the same Run Script action with both my Keyword input and my hardcoded input value. Also, substituting Run Script for Run NSAppleScript doesn't seem to work with my Keyword input either. I removed the "on alfred_script(q)", wrapped the script with "on run" and "end run", and replaced instances of "q" with argv / {query}. I noticed that Run NSAppleScript runs in Alfred's main thread and Run Script doesn't. Not sure if I'm getting the syntax wrong or if this script (moving files around) requires Alfred's main thread. Thanks again for the help!
  4. Hi all, I've got a seemingly basic question but couldn't find an answer anywhere. I'm currently using a workflow to move the currently selected files in Finder to the folder specified via keyword argument. It's a simple workflow with two components: [Keyword Input] --> [Run NSAppleScript]. My question is this: how do I pass a hardcoded value/string as an argument to Run NSAppleScript for frequently used destination folders? I could obviously copy the Run NSAppleScript component and replaced all instances of "q" in the script with the hardcoded folder, but I suspect there's a better way which avoids code duplication. I thought the "Arg and Vars" utility might be relevant here, but it doesn't seem able to generate an argument to pass on to downstream components. Has anyone else encountered a need for this before? Any help would be much appreciated!
×
×
  • Create New...